diff options
author | Britney Fransen <brfransen@gmail.com> | 2015-11-12 18:59:24 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2015-11-12 18:59:24 (GMT) |
commit | a37f4c1263e867e049502aeb96a8a207424ae46c (patch) | |
tree | 0979974951f4675084c8721a6f2d9ea5bb1e8426 /abs/core/LinHES-system/myth_mtc.cron | |
parent | ba2be7bcf3bd61642fb50ff779fbcea4d4df597c (diff) | |
download | linhes_pkgbuild-a37f4c1263e867e049502aeb96a8a207424ae46c.zip linhes_pkgbuild-a37f4c1263e867e049502aeb96a8a207424ae46c.tar.gz linhes_pkgbuild-a37f4c1263e867e049502aeb96a8a207424ae46c.tar.bz2 |
LinHES-system: myth_mtc.py & myth_mtc.cron: add new --check_home option.
The --check_home option checks how full home is and if it is over 90% it will remove caches in .mythtv and restart mythfrontend.
Diffstat (limited to 'abs/core/LinHES-system/myth_mtc.cron')
-rwxr-xr-x | abs/core/LinHES-system/myth_mtc.cron | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/abs/core/LinHES-system/myth_mtc.cron b/abs/core/LinHES-system/myth_mtc.cron index d3dc50a..ff8e84a 100755 --- a/abs/core/LinHES-system/myth_mtc.cron +++ b/abs/core/LinHES-system/myth_mtc.cron @@ -16,6 +16,19 @@ fi #check logfile for Finished and if not run myth_mtc.py if ! grep -q "Finished Maintenance" $logFile then + + if ! grep -q "Finished checking size of MythTV home" $logFile + then + MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --check_home | $log + if [ $? = 0 ] + then + echo "" | $log + else + echo "Time Exceeded" | $log + exit + fi + fi + if ! grep -q "Finished Optimize" $logFile then MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py --optimize | $log @@ -52,7 +65,7 @@ then fi fi - if grep -q "Finished Optimize" $logFile && grep -q "Finished Backup" $logFile && grep -q "Finished Update" $logFile + if grep -q "Finished checking size of MythTV home" $logFile && grep -q "Finished Optimize" $logFile && grep -q "Finished Backup" $logFile && grep -q "Finished Update" $logFile then echo "Finished Maintenance" | $log fi |