Page 1 of 1

Damoen can't find sabnzbd.py

Posted: January 19th, 2009, 12:03 pm
by mj112
Hi
First of all i am really new to ubuntu (just installed it a few days ago - so i don't understand half of what i do) everything i do is done by some sort of guide found on the internet. Now here is the problem, i installed sabnzbd+ and it woked like a charm. Next up was to create the daemon (don't really know what that is) so i download an .sh file with the following code
#! /bin/bash

## CONFIG ##
USERNAME="myusername"
HOST="localhost"
PORT="8080"
## / CONFIG ##

case "$1" in
start)
        echo "Starting SABnzbd."
        /usr/bin/sudo -u $USERNAME -H python /usr/share/sabnzbdplus/SABnzbd.py -f /home/$USERNAME/.sabnzbd/sabnzbd.ini --browser 0 -d
        ;;
stop)
        echo "Shutting down SABnzbd."
        /usr/bin/wget -q --delete-after "http://$HOST:$PORT/sabnzbd/api?mode=shutdown"
        ;;
*)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0
used the following commands

Code: Select all

chmod +x ~/Desktop/sabnzbd.sh
and then

Code: Select all

sudo cp ~/Desktop/sabnzbd.sh /etc/init.d
sudo update-rc.d -f sabnzbd remove
sudo update-rc.d -f sabnzbd defaults
I then tried restarting and nothing happens, when i try the command

Code: Select all

sudo /etc/init.d/sabnzbd.sh start
i get an error saying it cant find the sabnzbd.py
/usr/share/sabnzbdplus/SABnzbd.py
(what is that?)

I did just as the manual for ubuntu says i have to do when i installed it... but it wont work..

now if i instead of

Code: Select all

  /usr/bin/sudo -u $USERNAME -H python /usr/share/sabnzbdplus/SABnzbd.py -f /home/$USERNAME/.sabnzbd/sabnzbd.ini --browser 0 -d
just replace it with

Code: Select all

 /usr/bin/sudo sabnzbdplus
it works fine, but i guess something isn't as it's suppose to be right???

Re: Damoen can't find sabnzbd.py

Posted: January 19th, 2009, 1:07 pm
by mj112
ofcourse it didn't work but i did find the root of my problem by checking /etc/init.d/sabnzbdplus
apparently i had to use

Code: Select all

/usr/bin/sabnzbdplus/SABnzbd.py
instead of

Code: Select all

/usr/share/sabnzbdplus/SABnzbd.py
silly me