summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/myth_mtc.cron
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-12-12 20:26:55 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-12-12 20:26:55 (GMT)
commitb97e90ff739fa2f7d27ed5c62ae8436c6ce2bb8d (patch)
treebc9551882ded56ac8fdb0ea27025fbcc06b1790b /abs/core/LinHES-system/myth_mtc.cron
parent5f58ea928f87bc20e8bb8102f8ce6272d3d6fc47 (diff)
downloadlinhes_pkgbuild-b97e90ff739fa2f7d27ed5c62ae8436c6ce2bb8d.zip
linhes_pkgbuild-b97e90ff739fa2f7d27ed5c62ae8436c6ce2bb8d.tar.gz
linhes_pkgbuild-b97e90ff739fa2f7d27ed5c62ae8436c6ce2bb8d.tar.bz2
LinHES-system: change myth_mtc.py to run in cron hourly to run more reliably after system is down or is busy.
Diffstat (limited to 'abs/core/LinHES-system/myth_mtc.cron')
-rwxr-xr-xabs/core/LinHES-system/myth_mtc.cron23
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