[mythtv-users] Monit and mythfrontend

David myth at dgreaves.com
Wed Dec 6 22:48:42 UTC 2006


David Fishburn wrote:
> Myth 0.20 
> Ubuntu Edgy
> 
> I found some good links for setting up Monit to monitor and restart
> mythbackend:
> http://www.gossamer-threads.com/lists/mythtv/users/120192
> 
> But I haven't found any scripts for monitoring the frontend.  Is this even
> possible given it must run inside of X and not as a separate daemon?

a stand-alone frontend:
edit /etc/inittab and add/change the 7 line to:
6:23:respawn:/sbin/mingetty --autologin mythtv tty6

then edit mythtv's .profile:
#############################
#
# If the login is on the 6th virtual console then start X and start the frontend
# To allow for upgrades when you don't want the frontend to run check the
/etc/nomyth file
# and exit after 10 seconds (to stop init respawning too quickly)
[ `tty` = '/dev/tty6' -a -f /etc/nomyth ] && { sleep 10; exit; }
[ `tty` = '/dev/tty6' ] && exec /usr/bin/X11/startx /usr/bin/mythfrontend -v 255
2>&1 > ~/myth.log
#
# This works by changing the following line in /etc/inittab from
#   6:23:respawn:/sbin/getty 38400 tty5
# to
#   6:23:respawn:/sbin/mingetty --autologin mythtv tty6
#
# Of course you need mingetty installed


# Drop through to here to allow normal shell execution if we're not logging in
on the 6th virtual console
[ -f .aliases ] && . .aliases
[ -f .prompt  ] && . .prompt
# End
#############################


otherwise:
mv mythfrontend mythfrontend.orig

create a script:
#!/bin/sh
while true
do
mythfrontend.orig
done


David



More information about the mythtv-users mailing list