summaryrefslogtreecommitdiff
path: root/japanese/p5-2chproxy/files/twochproxy.in
blob: 9e3b75ac2e1bb82ae37794dc60afaecd667f8d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# PROVIDE: twochproxy
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# $FreeBSD$

. /etc/rc.subr

name=twochproxy
rcvar=${name}_enable

command=%%PREFIX%%/sbin/2chproxy.pl
start_cmd=${name}_start
stop_cmd=${name}_stop
load_rc_config $name
pidfile=/var/run/2chproxy.pid
: ${twochproxy_enable:=NO}

twochproxy_start()
{

	$command --daemon
}
twochproxy_stop()
{

	$command --kill && rm -f $pidfile
}

run_rc_command "$1"