Page 1 of 1

Ubuntu Lucid 10.04 Shutdown on Queue finish Script

Posted: October 15th, 2010, 9:43 am
by Celox
I was unable to find one, so i made one my myself.
There are a few prerequisite steps needed to run the script successfully.

1. You need to have upower installed:

Code: Select all

sudo apt-get install upower
2. Set the proper permissions for the user that is running sabnzbd:

Code: Select all

polkit-auth --user youruser --grant org.freedesktop.hal.power-management.shutdown
polkit-auth --user youruser --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions
3. create the script "sudo nano SabDoShutdown.py"

Code: Select all

#!/usr/bin/python
import os
command = "sudo shutdown -h now"
os.system(command)
4. Place the script in your post-processing directory that should be used by Sabnzbd:
Config->Folders->Post-Processing Scripts Folder:

Code: Select all

/home/youruser/mypostprocessingfolder
I hope that helps someoneĀ  :)

Re: Ubuntu Lucid 10.04 Shutdown on Queue finish Script

Posted: January 5th, 2011, 1:20 am
by krackt
it helped me and works like a charm. thanks :)