Ik ben eens bezig geweest om sntop tijdens een reboot mee op te laten starten. Ik heb nu alsvolgt gedaan:
Aan "rc.conf" toegevoegd:
sntop_enable="YES"
sntop_flags="-d -r 60 -f /usr/local/etc/sntoprc -w -e /usr/local/www/sntop/index.html"
In "/usr/local/etc/rc.d" nieuwe file "sntop" aangemaakt:
#!/bin/sh
#
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
# SET THEM IN THE /etc/rc.conf FILE
#
sntop_enable=${sntop_enable-"NO"}
sntop_flags=${sntop_flags-""}
sntop_pidfile=${sntop_pidfile-"/var/run/sntop.pid"}
. /etc/rc.subr
name="sntop"
rcvar=`set_rcvar`
command="/usr/local/bin/${name}"
command_args="&"
load_rc_config $name
pidfile="${sntop_pidfile}"
start_cmd="echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command} ${sntop_flags} ${command_args}"
run_rc_command "$1"
Zodra ik nu opnieuw opstart wordt sntop niet geladen... En volgens alle documentatie is de procedure wel goed toch?
Aan "rc.conf" toegevoegd:
sntop_enable="YES"
sntop_flags="-d -r 60 -f /usr/local/etc/sntoprc -w -e /usr/local/www/sntop/index.html"
In "/usr/local/etc/rc.d" nieuwe file "sntop" aangemaakt:
#!/bin/sh
#
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
# SET THEM IN THE /etc/rc.conf FILE
#
sntop_enable=${sntop_enable-"NO"}
sntop_flags=${sntop_flags-""}
sntop_pidfile=${sntop_pidfile-"/var/run/sntop.pid"}
. /etc/rc.subr
name="sntop"
rcvar=`set_rcvar`
command="/usr/local/bin/${name}"
command_args="&"
load_rc_config $name
pidfile="${sntop_pidfile}"
start_cmd="echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command} ${sntop_flags} ${command_args}"
run_rc_command "$1"
Zodra ik nu opnieuw opstart wordt sntop niet geladen... En volgens alle documentatie is de procedure wel goed toch?