diff options
Diffstat (limited to 'linhes/linhes-system/lh_mtc.cron')
-rw-r--r-- | linhes/linhes-system/lh_mtc.cron | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/linhes/linhes-system/lh_mtc.cron b/linhes/linhes-system/lh_mtc.cron index b556d60..75610b5 100644 --- a/linhes/linhes-system/lh_mtc.cron +++ b/linhes/linhes-system/lh_mtc.cron @@ -32,11 +32,8 @@ then if ! grep -q "Finished Optimize" $logFile then - if [ $SystemType = FrontendOnly ] + if [ $SystemType = MasterBackend ] then - echo "Will not run Optimize on Frontend Only systems." | $log - echo "Finished Optimize" | $log - else sudo -u mythtv bash -c "MYTHCONFDIR=/usr/share/mythtv unbuffer lh_mtc.py --optimize | $log" if [ $? = 0 ] then @@ -45,18 +42,27 @@ then echo "Time Exceeded" | $log exit fi + else + echo "Will not run Optimize on Frontend or Desktop Only systems." | $log + echo "Finished Optimize" | $log fi fi if ! grep -q "Finished Backup" $logFile && grep -q "Finished Optimize" $logFile then - sudo -u mythtv bash -c "MYTHCONFDIR=/usr/share/mythtv unbuffer lh_mtc.py --backup | $log" - if [ $? = 0 ] + if [ $SystemType != DesktopOnly ] then - echo "" | $log + sudo -u mythtv bash -c "MYTHCONFDIR=/usr/share/mythtv unbuffer lh_mtc.py --backup | $log" + if [ $? = 0 ] + then + echo "" | $log + else + echo "Time Exceeded" | $log + exit + fi else - echo "Time Exceeded" | $log - exit + echo "Will not run Backup on Desktop Only systems." | $log + echo "Finished Backup" | $log fi fi |