Ubuntu Lucid 10.04 Shutdown on Queue finish Script

Come up with a useful post-processing script? Share it here!
Post Reply
Celox
Newbie
Newbie
Posts: 10
Joined: October 15th, 2010, 9:29 am

Ubuntu Lucid 10.04 Shutdown on Queue finish Script

Post 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  :)
krackt
Newbie
Newbie
Posts: 37
Joined: December 29th, 2010, 7:15 am

Re: Ubuntu Lucid 10.04 Shutdown on Queue finish Script

Post by krackt »

it helped me and works like a charm. thanks :)
SABnzbd 0.7.17 JCFP Ubuntu ppa
Precise 12.04.4 LTS x86_64
XBMC Gotham 14.0-alpha1 Git:577494a 20140406
ASRock ION 330-BD Intel Dual Core Atom 1.6GHz
4GB RAM | HDMI Display | Analogue Audio | Flirc IR
Post Reply