Kodi Community Forum

Full Version: Auto Restart XBMC after crash in Ubuntu Minimal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI everyone. I am running Frodo on Ubuntu Minimal 12.10 on an SSD inside an Intel NUC i3 with 8 gig of ram. I have it to the point where I think it is stable and usable. But everyone once in a while it or I will do something that will crash XBMC and I need to ssh in to call a restart since the PC is in a media closet on the top shelf.

Is there a way to get it to automatically restart or - better yet - reboot the entire system to start from a clean slate AFTER a crash? I set it up to auto run on boot based on the very nice script put together by Bram77:

https://raw.github.com/Bram77/xbmc-ubunt...all_2_6.sh

I didnt actually run the script, just cherry picked which parts I needed so I can both learn a little and keep things as simple as possible. For the auto start, I used the function "installXbmcInitScript" as a guide which, from my basic understanding of linux, adds the xbmc script file to the list of Services for the OS (update-rc.d):

https://github.com/Bram77/xbmc-ubuntu-mi...nit_script

Thanks
Ernie
You can use irexec to map a remote button to restart/reboot xbmc when it crashes.

http://forum.xbmc.org/showthread.php?tid...id=1446466

Its instructions for openelec so you will need to change some of the directories/file locations.
using the upstart method will give you auto restarts on xbmc crash, but only on real crashes, not lockups.
Thanks guys.

I tried the upstart method. After doing it my smb connections stopped working - nothing would connection. I backed out the changes and went back to the orginal init script and all is as it should be. Does that make sense?

teee, I will look into your method. I would still prefer something automatic but that fact that your technique would work on lock ups as well is pretty cool.

Ernie
the upstart script might start too fast if you need network to be up first. adding something like "and net-device-up" to the "start on" section will probably help.