nkskjames
05-02-08, 09:22 AM
I have an issue where when playing some DVD iso's from mythfrontend, VLC would seg fault when exiting the movie and take the mythfrontend down with it. Since my HTPC has no keyboard or mouse, and my wife doesn't know how to restart it via VNC, I decided instead of figuring why it was crashing, I would just automatically restart the frontend. The crash only happens when exiting the movie, so seems like a good approach. Anyway, I thought I would share the simple restart script. It is not a crontab because those can only be on 1 minute intervals and I don't won't anybody having to wait a minute. I simply autostart this script instead of the frontend directly. The script is just an infinite loop on starting the frontend unless a kill file exists.
#! /bin/bash
rm /tmp/killmyth
while [ ! -e /tmp/killmyth ]; do
echo 'Starting mythfrontend'
mythfrontend --service
done
#! /bin/bash
rm /tmp/killmyth
while [ ! -e /tmp/killmyth ]; do
echo 'Starting mythfrontend'
mythfrontend --service
done