2013-08-07, 02:48
First off, I've got no idea what I'm doing I just threw this together from already existing scripts and edited stuff to make it work for my case.
Now my problem is that when I stop the script manually I get
That's all fine and good since the script still works as it should but sometimes on xbmc exit it seems to freeze up because of this (or something else I did), any pointers where I go wrong?
Things I added:
As you can see in addition to the original functions of the powersave service this loads the file inhibit_shutdown.py to check for activity on certain ports before shutting down the htpc.
Complete scripts:
powersave.py http://pastebin.com/EvDZ8eMt
inhibit_shutdown.py http://pastebin.com/SfX7tm2C
Original creator of the powersave script http://forum.xbmc.org/showthread.php?tid=115899
Now my problem is that when I stop the script manually I get
Code:
..../service.vdr.powersafe/default.py): script didn't stop in 5 seconds - let's kill it
That's all fine and good since the script still works as it should but sometimes on xbmc exit it seems to freeze up because of this (or something else I did), any pointers where I go wrong?
Things I added:
Code:
import xbmc, xbmcaddon, xbmcgui, xbmcplugin, inhibit_shutdown
....
# check netstat
def check_netstat():
if inhibit_shutdown.check_services():
return True
return False
.....
elif check_netstat():
print "vdr.powersave: powersave postponed - Network activity ..."
As you can see in addition to the original functions of the powersave service this loads the file inhibit_shutdown.py to check for activity on certain ports before shutting down the htpc.
Complete scripts:
powersave.py http://pastebin.com/EvDZ8eMt
inhibit_shutdown.py http://pastebin.com/SfX7tm2C
Original creator of the powersave script http://forum.xbmc.org/showthread.php?tid=115899