Can't get local script to start at boot time

I have a problem

I put a script in /usr/local/etc/rc.d to start sabnzbd.
but it i will not work! When i run at the shell it works fine!

bsdrabbit# ./sabnzbd start
Starting SABnzbd.

But it will not start a boot time:( It put the x bit there! gave it 755!?

this is the script

#!/bin/sh

case "$1" in
start)
echo "Starting SABnzbd."
/usr/local/bin/SABnzbd.py -d -f /usr/sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0

Can some one please help...
 
bsdrabbit# ./sab start
Starting SABnzbd.

It run great from the shell.. but i also don't see anything loading when freeBSD boots like that echo <Starting SABnzbd>
 
try this

Code:
#!/bin/sh

. /etc/rc.subr

name="sabnzbd"
rcvar=${name}_enable

: ${sabnzbd_enable="NO"}

command=/usr/local/bin/SABnzbd.py
command_args="-d -f /usr/sabnzbd/sabnzbd.ini"

run_rc_command "$1"
 
Back
Top