[Linux] [RELEASE]Plugin for Timer- and Powermanagement in XBMCbuntu/XBMC-live and TVHeadend - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: PVR Development (/forumdisplay.php?fid=136)
+--- Thread: [Linux] [RELEASE]Plugin for Timer- and Powermanagement in XBMCbuntu/XBMC-live and TVHeadend (/showthread.php?tid=115758)
- fecus - 2011-12-24 13:35
The life isn't easy. The ubuntu update files. I never do it again. New xbmc.bin arrived. Now, the xbmc display error with shutdown.sh.:
12:21:18 T:2980039536 ERROR: Error Contents: ('invalid syntax', ('/home/fecus/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh', 2, 7, 'sleep 2\n'))
12:21:18 T:2980039536 ERROR: SyntaxError: ('invalid syntax', ('/home/fecus/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh', 2, 7, 'sleep 2\n'))
It doesn't finish the power down.
- _BJ1 - 2011-12-24 17:21
It fails on the very first instruction into the shutdown.sh. Are executable rights, owner and group changed for the shutdown.sh? Also, looks the first line like:
- fecus - 2011-12-25 23:45
_BJ1 Wrote:It fails on the very first instruction into the shutdown.sh. Are executable rights, owner and group changed for the shutdown.sh? Also, looks the first line like:
I reinstall, and re-set the rights. Nothing work.
Is it a python interpreter problem?
- _BJ1 - 2011-12-26 00:26
fecus Wrote:Is it a python interpreter problem?
The shutdown.sh is an usual shellscript. Who is the user running xbmc? Maybe there are permissions.
- fecus - 2011-12-26 12:24
_BJ1 Wrote:The shutdown.sh is an usual shellscript. Who is the user running xbmc? Maybe there are permissions.It has 3 user : mythtv, fecus, hts
Before upgrade I added the xbmc to autorun programs and clear mythTV frontend. (This was the Mythbuntu install, originally)
I set the rights - as you wrote - for fecus, and everithing work.
After upgrade something change.
### XBMC specific configuration ###
Cmnd_Alias PVR_CMDS = /home/fecus/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh
fecus ALL=NOPASSWD: PVR_CMDS # XBMC
Rights of default.py:
Rights of shutdown.sh:
Rights of xbmc.bin:
I don't have more idea.
I'm sorry for this disturbing and Merry Christmas!
- _BJ1 - 2011-12-27 12:11
Sorry fecus, I have also no idea. Anyone else here?
- fecus - 2011-12-27 18:04
_BJ1 Wrote:Sorry fecus, I have also no idea. Anyone else here?
Today everything work. I don't know why. I made two success records. Only I disable the xbmc in autorun in GUI. The xbmc didn't run. Then I set again. The shutdown.sh run without error and set the rtc.
Maybe the upgrade set autorun with other rights. I overwrite something with my user when I reset autorun. It is only theory.
Now I disable upgrade, except security.
Thank you everything and Happy New Year!
- _BJ1 - 2011-12-27 18:18
I'm glad that it's now working! Happy New Year!
- _BJ1 - 2012-01-24 23:36
Update. See first post.
- harryzimm - 2012-02-16 21:52
Whats the best way to add a check to see if there is a current subscription active? I also stream to my apple tv2 and would like the tvheadend server to remain on if i am steaming to my atv2. (hope this makes sense )
hope you can help
I just added this to the script and it working great so far
# Check for current subscription. If there an active 'subscription' tag,
recNodes = xmldoc.getElementsByTagName('subscriptions')
state = ''
status = recNodes.childNodes.data
if status == "1":
powerOff = False
state = 'no current subscription(s)'
extramargin = 0
if c: extramargin = int(__counter__)
I have no idea if this the correct way but it seems to be working