blob: 4f63dec06b137e4b423ee8ea09a031408c81ce36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|