You are not logged in.
Pages: 1
Any sabnzbd users here, who have written a init script for it, by chance?
Last edited by Zepp (2008-07-11 22:11:52)
Offline
Alright I finished my OS project for school and had some free time so I wrote my own. Maybe someone will find this useful.
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
SABNZBD_USER="sabnzbd"
SABNZBD_CONF="/home/sabnzbd/.sabnzbd/sabnzbd.ini"
PID=`pidof -o %PPID -x SABnzbd.py`
case "$1" in
start)
stat_busy "Starting SABnzbd"
[ -z "$PID" ] && su - $SABNZBD_USER -c "/usr/share/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -d"
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon sabnzbd
stat_done
fi
;;
stop)
stat_busy "Stopping SABnzbd"
[ "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon sabnzbd
stat_done
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Offline
Sorry to be a complete newb, but how do I get this to run at bootup?
Sorry again
Luke
Offline
There is a newer version of the unit script in AUR, use that. After you install the aur package or manually save the script to /etc/rc.d/sabnzbd you simply add sabnzbd to the daemons list in /etc/rc.conf like any other daemon.
Offline
Pages: 1