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: go to the bottom of the file and write: ***
Code: Select all
[username] ALL=(ALL) NOPASSWD: /usr/sbin/powernap
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
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
Code: Select all
nano /home/[username]/script/sleep
Code: Select all
#!/bin/bash
sudo /usr/sbin/powernap
Press Y
Press Enter
CHMOD the script so it is executable:
Code: Select all
CHMOD 775 /home/[username]/script/sleep
Code: Select all
/home/[username]/script/sleep
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