[mythtv-users] mythfrontend/mythbackend dying? - try restartd

Ross Campbell ross.campbell at gmail.com
Tue May 10 00:04:35 UTC 2005


Just ran across restartd the other day - it's simple and does exactly
what I was looking for (and probably would be useful to other mythtv
users).

*Sometimes* for various reasons mythfrontend or mythbackend dies... It
doesn't happen to me very often anymore, but my wife seems to be able
to figure out how to crash mythfrontend.

If your S.O./wife/family (or you!) don't think opening up an xterm,
checking the running process list if necessary, and starting up a new
mythfrontend/backend is *fun*, consider this:


http://packages.debian.org/unstable/source/restartd


just add something like the following config lines to
/etc/restartd.conf - season to taste, of course ;)

mythfrontend   ".*mythfrontend"       "/usr/bin/mythfrontend' 
"/bin/echo 'mythfrontend is running' > /dev/null"

mythbackend   ".*mythbackend"       "/etc/init.d/mythbackend restart' 
"/bin/echo 'mythbackend is running' > /dev/null"


Then, just run /usr/sbin/restartd or make a startup script for the GUI
runlevel(s) for it and start it last (or start it in /etc/rc.local)

Works for me - YMMV - only a few potential issues I can see:
0) You probably don't want mythfrontend to try to run in a non-GUI
runlevel and you don't want it start before X loads and before your
autologin job starts mythfrontend for the first time -- perhaps better
to put 'sleep 180 && /usr/sbin/restartd' into /etc/rc.local or
/etc/rc5.d/S99restartd
1) runs both as root (or... su - mythtv mythfrontend ?)
2) default 20 second restart makes it hard to actually kill the
frontend and/or backend on purpose
3) **you** need to remember to kill restartd before you do any
upgrades or maintenance or anything else where you want to stop these
processes on purpose

Hope others find this useful. It sure beats mapping a button on the
remote via lirc to do a restart of mythfrontend :)

-Ross


More information about the mythtv-users mailing list