On 30/01/07, Tom Metro <[EMAIL PROTECTED]> wrote:

8<
> I have a cron job that polls myth every 5 mins so that's all I'll ever
lose.

Care to share your script?

Cron entry (under root)...
*/5 * * * * <my_path_to_the_script>/myth-monitor.sh

Script (myth-monitor.sh)...

#!/bin/bash
#
# /home/mythtv/crontscripts/myth-monitor.sh
# This is run from cron every 5 minutes.
#

ps -C mythbackend > /dev/null && exit 0;

# append message to log file...
echo "`date +%Y-%m-%d\ %T.%-3N` mythbackend not running! Restarting..." \
        >> /var/log/mythtv/mythbackend.log;
/etc/init.d/mythtv-backend restart
exit 1;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mvpmc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mvpmc-users
mvpmc wiki: http://mvpmc.wikispaces.com/

Reply via email to