diff options
author | Britney Fransen <brfransen@gmail.com> | 2025-01-01 07:42:15 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2025-01-01 07:42:15 (GMT) |
commit | b42c5a107dbfde42ff10aad8f9edc828e557bef5 (patch) | |
tree | 602cc6dd7fe3e526658c63e9a7486f405552adc9 /linhes/linhes-system/lh_mtc.cron | |
parent | 2f9cd04b34011c520ae42ff5b665dff2c6392d90 (diff) | |
download | linhes_pkgbuild-b42c5a107dbfde42ff10aad8f9edc828e557bef5.zip linhes_pkgbuild-b42c5a107dbfde42ff10aad8f9edc828e557bef5.tar.gz linhes_pkgbuild-b42c5a107dbfde42ff10aad8f9edc828e557bef5.tar.bz2 |
linhes-system: lh_mtc.cron: don't optimize or backup on desktop
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 |