mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-27 09:33:40 +00:00
446eca71b7
On FreeBSD, the snac process is now managed by the daemon(8) utility - this means it will be restarted in case of crash, etc.
27 lines
No EOL
521 B
Text
27 lines
No EOL
521 B
Text
# 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"}
|
|
: ${snac_pidfile:="/var/run/snac/snac.pid"}
|
|
: ${snac_rundir:="/var/run/snac"}
|
|
|
|
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}
|
|
}
|
|
|
|
run_rc_command "$1" |