2024-01-03 13:51:36 +00:00
|
|
|
# PROVIDE: snac
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="snac"
|
|
|
|
rcvar=snac_enable
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
: ${snac_enable:=NO}
|
|
|
|
: ${snac_user:="snac"}
|
|
|
|
: ${snac_args:="httpd SNAC_DATA_PATH"}
|
2024-11-08 08:01:53 +00:00
|
|
|
: ${snac_pidfile:="/var/run/snac/snac.pid"}
|
|
|
|
: ${snac_rundir:="/var/run/snac"}
|
2024-01-03 13:51:36 +00:00
|
|
|
|
2024-11-08 08:01:53 +00:00
|
|
|
start_precmd="snac_precmd"
|
|
|
|
command="/usr/sbin/daemon"
|
|
|
|
command_args="-P ${snac_pidfile} -r -f /usr/local/bin/snac ${snac_args}"
|
|
|
|
|
|
|
|
snac_precmd()
|
|
|
|
{
|
|
|
|
install -d -m 755 -o ${snac_user} -g ${snac_user} ${snac_rundir}
|
|
|
|
}
|
2024-01-03 13:51:36 +00:00
|
|
|
|
|
|
|
run_rc_command "$1"
|