Debian init script
Posted: March 20th, 2010, 3:23 pm
I got this all running on my debian box today. Maybe this isn't the place to share this?
save above as sabnzbd
init script goes in /etc/init.d
chmod +x
you need to create user sabnzb
also must untar src file to /usr/share/sabnzbd
good luck
Code: Select all
#!/bin/bash
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u sabnzb -H /usr/share/sabnzbd/SABnzbd.py -d -f /home/sabnzb/.sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://localhost:8080/sabnzbd/api?mode=shutdown&apikey=APIKEYHERE"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
init script goes in /etc/init.d
chmod +x
you need to create user sabnzb
also must untar src file to /usr/share/sabnzbd
good luck