SABnzbd on Ubuntu 10.04 power management (sleep) manual

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
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.
Post Reply
Zignut
Newbie
Newbie
Posts: 2
Joined: June 17th, 2010, 3:06 pm

SABnzbd on Ubuntu 10.04 power management (sleep) manual

Post by Zignut »

Here is how I got my PC with SABnzbdplus 0.5.x on Ubuntu 10.04 LTS to sleep on queue completion:

1) install powernap on your Ubuntu:

Code: Select all

sudo apt-get install powernap

2) add the following to your sudoers:

Code: Select all

sudo visudo
*** Important: [username] is your normal username ***
*** Important: go to the bottom of the file and write: ***

Code: Select all

[username] ALL=(ALL) NOPASSWD: /usr/sbin/powernap
Press CTRL+X
Press Y
Press Enter

This allows you to run powernap without having to type in root password.
You can at this point test that is works by rebooting and typing the following in a terminal:

Code: Select all

sudo /usr/sbin/powernap
If it sleeps without asking for root password it works :).


3) create a script for sabnzbd and a folder for the script:

I made a script folder in my /home/[username] folder

Code: Select all

mkdir /home/[username]/script
make the script (called sleep):

Code: Select all

nano /home/[username]/script/sleep
Type the follwing:

Code: Select all

#!/bin/bash
sudo /usr/sbin/powernap
Press CTRL+X
Press Y
Press Enter

CHMOD the script so it is executable:

Code: Select all

CHMOD 775 /home/[username]/script/sleep
Again you can check yur script by typing the following in a terminal:

Code: Select all

/home/[username]/script/sleep
4) Next step is to tell SABnzbd where your script folder is located.

In your sabnzbd webinterface go to General -> Folders and type "script/" in the "Post-Processing Scripts Folder:".
Click "Save changes".
Click "home" and you can now select your "sleep" script in the "On queue finish" drop down box.

Enjoy!

-Zignut
Last edited by Zignut on June 17th, 2010, 4:20 pm, edited 1 time in total.
Post Reply