Start script at boot time

Hello,

I want to run my shell script when my freeBSD 7 machine starts. The script works perfect when i run it manually as daemon.

This is the script
-----------START------------------
#!/bin/sh

case "$1" in
start)
echo "SABnzbd Gestart!."
sudo -u root -H /usr/local/bin/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
;;
stop)
echo "SABnzbd Gestopt!."
reboot
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0

-----------END------------------

I put the script in rc.d and called it sabnzbd and add the line in rc.conf --> sabnzbd_enable="YES"
But i am still missing a step.
i sad no settings start or stop ect. Can some body help a this point?.

Greetz SnowRabbit
 
I still not complety clear but i guess i need to use PROVIDE: start or something.Because when i boot i ask usage: /etc/rc/ {start:stop}
But thanks for your manual page link.
 
Back
Top