Write script to auto start XBMC after freeze or crash. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56) +---- Thread: Write script to auto start XBMC after freeze or crash. (/showthread.php?tid=183683) |
Write script to auto start XBMC after freeze or crash. - sdyates - 2014-01-17 I have done a lot of looking today. Most of what I have found comes from xvmc crashing. Most of my problems come from add ons freezing for long periods of time, though crashes do happen. Is there an api or port I can call to get a message. A port or api that will be silent if the application is frozen. To me frozen is the inability to use standard controls to advance to another screen. I am not a programmer, but I wrote a script years ago that listened on port 80 for an application an dafter two failed attempts I would force a restart. I was thinking of using this code as the restart to ensure that all threads are killed, but again, I have no idea how to test XBMC if it is frozen <code> sudo su - killall -9 xbmc.bin xinit /usr/local/bin/xbmc --standalone & </code> RE: Write script to auto start XBMC after freeze or crash. - activate - 2014-01-18 Are you trying to automate this or do you just need to activate a script manually (via your remote) when XBMC is not responding ? RE: Write script to auto start XBMC after freeze or crash. - sdyates - 2014-01-18 (2014-01-18, 14:38)activate Wrote: Are you trying to automate this or do you just need to activate a script manually (via your remote) when XBMC is not responding ? I am trying to automate the script. But, I want to make sure I do it the right way. I don't just want to restart XBMC if it fails, but to restart if it freezes or hangs. RE: Write script to auto start XBMC after freeze or crash. - activate - 2014-01-18 Yeah, I'm not a coder either but I'll be interested to see if you can make this work. I have used an app called Lingon that can restart an app when it crashes. I was talking with its developer and he indicated that its tricky to differentiate between when an pp is unresponsive (temporary state) and frozen. I have mannual scripts that I evoke via my remote when I encounter it for now. RE: Write script to auto start XBMC after freeze or crash. - sdyates - 2014-01-18 (2014-01-18, 15:08)activate Wrote: Yeah, I'm not a coder either but I'll be interested to see if you can make this work. I have used an app called Lingon that can restart an app when it crashes. I was talking with its developer and he indicated that its tricky to differentiate between when an pp is unresponsive (temporary state) and frozen. I wrote a script years ago that would essentially "ping" a port. Whenever the app become unresponsive, the port failed to respond. I waited for two failed responses and then triggered a restart. However, I don't know much about the inner workings of XBMC. I must have some ports that work the same way. Then it is easy to create a script. RE: Write script to auto start XBMC after freeze or crash. - activate - 2014-01-19 Does that mean the script would constantly ping XBMC ? RE: Write script to auto start XBMC after freeze or crash. - sdyates - 2014-01-19 (2014-01-19, 01:08)activate Wrote: Does that mean the script would constantly ping XBMC ? Yes, I can see no other way. However, if there is a better way, I am open to it, but I image a ping every 10 to 60 seconds would not cause a lot of overhead. Or is there a way of making this a kind of system service? RE: Write script to auto start XBMC after freeze or crash. - thefly666 - 2014-02-01 Download a program called Lingon from the app store ($4.99) and XBMC will always reopen after a crash RE: Write script to auto start XBMC after freeze or crash. - Gigantur - 2014-02-05 Enable the webserver or upnp for the remote and you have a port to ping |