aboutsummaryrefslogtreecommitdiff
path: root/net/sniproxy/files/sniproxy.in
blob: c9749e16b43c2e3c630af2df0b7701bcdc3cf294 (plain) (blame)
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
33
34
35
#!/bin/sh

# PROVIDE: sniproxy
# BEFORE:  DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable sniproxy:
#
# sniproxy_enable="YES"
#
#

. /etc/rc.subr

name=sniproxy
rcvar=sniproxy_enable

command=%%PREFIX%%/sbin/sniproxy

pidfile=${sniproxy_pidfile:-"/var/run/sniproxy.pid"}

sniproxy_enable=${sniproxy_enable:-"NO"}
sniproxy_conf=${sniproxy_conf:-"%%PREFIX%%/etc/sniproxy.conf"}

stop_postcmd="rm -f $pidfile"
sig_reload="HUP"

load_rc_config ${name}

required_files=${sniproxy_conf}

command_args="-c ${sniproxy_conf}"
run_rc_command "$1"