Hi folks,
I'm running Lubuntu 13:10 and SABnzbd 0.7.16 with the Plush - gold web interface.
If I select...
On Finish: Shutdown PC
...when the queue finishes SABnzbd shuts down OK, but the PC stays on.
Here's some log output:
http://pastebin.ubuntu.com/6589746/
Any ideas?
On Finish: Shutdown PC
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: On Finish: Shutdown PC
SABnzbd isn't compatible with your OS version.
Linux power management is limited, in a later release we'll expand it.
An alternative is to write your own little end-of-queue script that shuts down the system.
Linux power management is limited, in a later release we'll expand it.
An alternative is to write your own little end-of-queue script that shuts down the system.
Re: On Finish: Shutdown PC
I can get sab to shutdown the system fine in most cases on xubuntu 13.10, out of the box. How did you start sab? If you started it as a system service, does it make any difference if you restart the service after logging in to your lubuntu desktop (sudo service sabnzbdplus restart)?
Re: On Finish: Shutdown PC
I am starting it as a service and it always starts OK. Last night I tried restarting the service as you suggested and it did shutdown OK after that. Today I've tried it several more times, with and without restarting the service, but it's only shutdown the once.
That time I noticed when I ran restart I got this and I'm pretty sure that's what I saw last night when it worked too:
dunno if that's significant, but every other time I run restart I see [OK] rather than [fail]...
That time I noticed when I ran restart I got this and I'm pretty sure that's what I saw last night when it worked too:
Code: Select all
leon@htpc:~$ sudo service sabnzbdplus restart
[sudo] password for leon:
* SABnzbd+ binary newsgrabber: not running
* Starting SABnzbd+ binary newsgrabber [fail]
Re: On Finish: Shutdown PC
No clue unfortunately, this dbus stuff isn't my forte. Every time I try this in a xubuntu saucy/13.10 vm it just ... works.kammo wrote:Last night I tried restarting the service as you suggested and it did shutdown OK after that. Today I've tried it several more times, with and without restarting the service, but it's only shutdown the once.
Probably not, just a manually started instance in the way. In the heat of testing...kammo wrote:That time I noticed when I ran restart I got this and I'm pretty sure that's what I saw last night when it worked too:dunno if that's significant, but every other time I run restart I see [OK] rather than [fail]...Code: Select all
leon@htpc:~$ sudo service sabnzbdplus restart [sudo] password for leon: * SABnzbd+ binary newsgrabber: not running * Starting SABnzbd+ binary newsgrabber [fail]

Re: On Finish: Shutdown PC
Thanks for taking the time to help. It's more of a nicety than necessity - so no big deal.
Perhaps if I can find some time I'll give shypike's idea a shot and write an end of queue script - I'm a bit of a Linux noob and don't really know bash scripting - so not sure how far I'll get with that
Perhaps if I can find some time I'll give shypike's idea a shot and write an end of queue script - I'm a bit of a Linux noob and don't really know bash scripting - so not sure how far I'll get with that

Re: On Finish: Shutdown PC
The script could be really simple:
Shutting down the system this way requires root though, so you will have to give the user running sab the right execute the shutdown command as root without requiring interaction (i.e., without feeding sudo a password). Add a file under /etc/sudoers.d/ with ownership root:root, permissions 0440 (-r--r-----), that contains just this:(replace 'username' with the real thing, obviously)
Please note that /etc/sudoers.d/ is a directory; by default there's only a README file in there. Be careful to never touch the /etc/sudoers file, if you screw that one up sudo stops working!
Code: Select all
#!/bin/sh
sudo shutdown -h now
Code: Select all
username ALL = NOPASSWD: /sbin/shutdown
Please note that /etc/sudoers.d/ is a directory; by default there's only a README file in there. Be careful to never touch the /etc/sudoers file, if you screw that one up sudo stops working!
Re: On Finish: Shutdown PC
Just to say I've implemented the scripts according to jcfp's post above and all is well and sab is now shuting down consistantly.
@jcfp - Thanks again for your help...
@jcfp - Thanks again for your help...