mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 09:35:04 +00:00
Updated FreeBSD rc script
On FreeBSD, the snac process is now managed by the daemon(8) utility - this means it will be restarted in case of crash, etc.
This commit is contained in:
parent
2769e6b1d7
commit
446eca71b7
1 changed files with 10 additions and 2 deletions
|
@ -12,8 +12,16 @@ load_rc_config $name
|
||||||
: ${snac_enable:=NO}
|
: ${snac_enable:=NO}
|
||||||
: ${snac_user:="snac"}
|
: ${snac_user:="snac"}
|
||||||
: ${snac_args:="httpd SNAC_DATA_PATH"}
|
: ${snac_args:="httpd SNAC_DATA_PATH"}
|
||||||
|
: ${snac_pidfile:="/var/run/snac/snac.pid"}
|
||||||
|
: ${snac_rundir:="/var/run/snac"}
|
||||||
|
|
||||||
command="/usr/local/bin/snac"
|
start_precmd="snac_precmd"
|
||||||
command_args="${snac_args} > /var/log/snac.log 2>&1 &"
|
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"
|
run_rc_command "$1"
|
Loading…
Reference in a new issue