Hi
I am trying to make a startup script (in /usr/local/etc/rc.d/) start several processes. Somehow the script only manages to start some of the processes. Note that this is my first somewhat real attempt at writing a startup script.
Here is (hopefully) the relevant part of the script.
After a reboot of the system, often (always?)
I tried the following entry in /etc/rc.conf
but failed to find anything that looked relevant.
Can someone give me a hint how I can debug/investigate this? If possible avoiding to reboot the system (too often) as it is in production...
I am trying to make a startup script (in /usr/local/etc/rc.d/) start several processes. Somehow the script only manages to start some of the processes. Note that this is my first somewhat real attempt at writing a startup script.
Here is (hopefully) the relevant part of the script.
Code:
...
yaf_start()
{
echo "[YAF] Starting yaf (re0)..."
/usr/local/bin/yaf -c /usr/local/etc/yaf-re0.init --become-user <user> --become-group <group> &
echo "[YAF] Starting yaf (re1)..."
/usr/local/bin/yaf -c /usr/local/etc/yaf-re1.init --become-user <user> --become-group <group> &
echo "[YAF] Starting yaf (re2)..."
/usr/local/bin/yaf -c /usr/local/etc/yaf-re2.init --become-user <user> --become-group <group> &
echo "[YAF] Starting filedaemon..."
/usr/local/bin/filedaemon --in "/var/spool/silk/yaf/ipfix-re*" --nextdir "/var/spool/silk/destination" --lock
}
...
After a reboot of the system, often (always?)
filedaemon
is not running, although yaf
is. A /usr/local/etc/rc.d/yaf restart
cures this.I tried the following entry in /etc/rc.conf
Code:
rc_debug="yes"
Can someone give me a hint how I can debug/investigate this? If possible avoiding to reboot the system (too often) as it is in production...