Today I found that SABnzbdplus was not running anymore on my B3. This may (or may not) be related to my restarting Apache2 last week.
When I tried to restart the service using the shell script:
Code: Select all
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u ###### -H /opt/SABnzbd-0.7.17/SABnzbd.py -d -f /home/######/.sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://localhost:8080/sabnzbd/api?mode=shutdown&apikey=############
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
I managed to start the service using the command in the script.root@bubba:/home/martijn# /etc/init.d/sabnzbdplus stop
'etc/init.d/sabnzbdplus: line 1: syntax error near unexpected token `in
'etc/init.d/sabnzbdplus: line 1: `case "$1" in
Can anyone explain why the script doesn't work? (It did work until now).
Martijn