Add startup script for FreeBSD

This commit is contained in:
László Károlyi 2024-08-06 19:02:07 +02:00
parent 092f571f76
commit d5a0a9c565
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE

22
scripts/freebsd-daemon.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
# PROVIDE: munin_f2b_remote
# REQUIRE: LOGIN
. /etc/rc.subr
name=munin_f2b_remote
rcvar=${name}_enable
: ${munin_f2b_remote_enable:=no}
: ${munin_f2b_remote_user:=munin-f2b-remote}
: ${munin_f2b_remote_group:=munin-f2b-remote}
: ${munin_f2b_remote_chdir:=/home/munin-f2b-remote}
: ${pidfile=/var/run/munin-f2b-remote/${name}-supervisor.pid}
: ${logfile=/var/log-munin-f2b-remote/${name}.log}
command="/usr/sbin/daemon"
command_args="-o ${logfile} -H -P ${pidfile} -r /usr/local/src/munin-f2b-remote/f2b-responder.py"
load_rc_config $name
run_rc_command "$1"