diff --git a/scripts/freebsd-daemon.sh b/scripts/freebsd-daemon.sh new file mode 100755 index 0000000..b596c33 --- /dev/null +++ b/scripts/freebsd-daemon.sh @@ -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"