![]() |
|
[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: #! /bin/sh ? Merry Christmas. _BJ1 - 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. _BJ1 - 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. In remote.xml: <power>XBMC.RunScript(script.program.pvrmanager)</power> visudo: ### XBMC specific configuration ### # XBMC 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: owner: fecus group: fecus 100755 Rights of shutdown.sh: owner: fecus group: fecus 100755 Rights of xbmc.bin: owner: root group: root 100755 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? _BJ1 - 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 - _BJ1 - 2012-01-24 23:36 Update. See first post. _BJ1 - harryzimm - 2012-02-16 21:52 Hi 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 ) status.xml <currentload> <recordings> <recording> <next>13</next> </recording> </recordings> <subscriptions>1</subscriptions> </currentload> hope you can help EDIT: 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 = '' if recNodes: status = recNodes[0].childNodes[0].data if status == "1": powerOff = False return powerOff else: 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 cheers |