Sign up here and you can log into the forum!

[SOLVED] Autostart SABnzbd+

This is the place to ask for how to use software that is (or isn't) included in the various wdlxtv flavours. Questions about software such as rtorrent, NZBGet, sshfs, curlftpfs, ssh, telnet, etc.

[SOLVED] Autostart SABnzbd+   

Postby Morto » Sat May 19, 2012 10:21 am

Hi Guys,

I have tried to install SABnzbd+ on my WDTV Live.
Everything got installed the only problem is the Autostart script i just cant get it to work.

When i run the following command from the script its working:

Code: Select all
/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d


But when i put this script.

Code: Select all
#!/opt/bin/bash
case "$1" in
start)
  echo "Starting SABnzbd."
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
;;
stop)
  echo "Shutting down SABnzbd."
  wget -q --delete-after "http://localhost:8080/sabnzbd/api?mode=shutdown&ma_username=[USER]&ma_password=[PASS]&apikey=[APIKEY]"
;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
;;
esac
exit 0


And put it in /opt/etc/init.d/ with the following name S89SABnzbd and give it the chmod command +x and restart my WDlive it wont autostart.

Can someone help me :S Thanks
Last edited by Morto on Sat May 19, 2012 11:48 am, edited 1 time in total.
Morto
n00b
 
Posts: 2
Joined: Tue Oct 11, 2011 11:23 am

Re: Autostart SABnzbd+   

Postby recliq » Sat May 19, 2012 10:47 am

do you have /opt/bin/bash ??
Otherwise replace it with /bin/bash.

Does /opt/etc/init.d/S89SABnzbd start work?
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5036
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Autostart SABnzbd+   

Postby Morto » Sat May 19, 2012 11:26 am

recliq wrote:do you have /opt/bin/bash ??
Otherwise replace it with /bin/bash.

Does /opt/etc/init.d/S89SABnzbd start work?


I dont have /opt/bin/bash nor /bin/bash.

When i run /opt/etc/init.d/S89SABnzbd it says

Bash: /opt/etc/init.d/S89SABnzbd: /bin/bash: bad interpreter: No such file or directory

**EDIT**

Did some searching with find / -name bash -print
/usr/bin/bash

so change the script to /usr/bin/bash/ chmod it again but when it try to run it i get -sh: /opt/etc/init.d/S89SABnzbd: Permission denied

**EDIT2**

lol made a misstake with chmod used -x but had to be +x :P
So mine bash was at /usr/bin/bash

It works now :P thanks for the headsup
Morto
n00b
 
Posts: 2
Joined: Tue Oct 11, 2011 11:23 am


Return to Application Questions

Who is online

Users browsing this forum: No registered users and 2 guests