diff options
Diffstat (limited to 'abs/core/LinHES-system/myth_mtc.cron')
-rwxr-xr-x | abs/core/LinHES-system/myth_mtc.cron | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/myth_mtc.cron b/abs/core/LinHES-system/myth_mtc.cron new file mode 100755 index 0000000..4f63dec --- /dev/null +++ b/abs/core/LinHES-system/myth_mtc.cron @@ -0,0 +1,23 @@ +#!/bin/bash +MYTH_RUN_STATUS=1 +. /etc/profile + +date=`date +%Y-%m-%d` +timestamp=`date +'%Y-%m-%d %H:%M'` +logFile="/var/log/$date/myth_mtc.log" + +if [ ! -f $logFile ]; then + touch $logFile +fi + +#check logfile for Finished and if not run myth_mtc.py +if ! grep -q "Finished" $logFile +then + MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py >> $logFile 2>&1 + if [ $? = 0 ] + then + echo "Finished $timestamp" >> $logFile + else + echo "Time Exceeded $timestamp" >> $logFile + fi +fi |