freebsd-ports/net/sniproxy/files/sniproxy.in
Kirill Ponomarev 815b3d6b19 net/sniproxy: Add REQUIRE: DAEMON
Reported by:	Karl Jeacle <karl  at  jeacle#ie>
2022-07-31 08:19:55 +02:00

35 lines
572 B
Bash

#!/bin/sh
# PROVIDE: sniproxy
# REQUIRE: 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"