diff options
Diffstat (limited to 'abs/core/LinHES-system/myth_mtc.py')
-rwxr-xr-x | abs/core/LinHES-system/myth_mtc.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/abs/core/LinHES-system/myth_mtc.py b/abs/core/LinHES-system/myth_mtc.py index ee4fde2..e62592f 100755 --- a/abs/core/LinHES-system/myth_mtc.py +++ b/abs/core/LinHES-system/myth_mtc.py @@ -84,8 +84,20 @@ def bail_if_another_is_running(): def run_stuff(): print "\n%s" %get_timestamp() - if not subprocess.call(["/usr/bin/python2", "/usr/LH/bin/idle.py"]): - if ("--check_home" in sys.argv) or (len(sys.argv) == 1): + + if (len(sys.argv) == 1) or ("--noidlecheck" in sys.argv) and (len(sys.argv) == 2): + runall = True + else: + runall = False + + if ("--noidlecheck" in sys.argv): + print "No system idle check will be done." + idle = 0 + else: + idle = subprocess.call(["/usr/bin/python2", "/usr/LH/bin/idle.py"]) + + if not idle: + if ("--check_home" in sys.argv) or runall: print "\n#######################################" print "\n%s Checking size of MythTV home" %(get_timestamp()) if not check_home(): @@ -93,7 +105,7 @@ def run_stuff(): else: return True - if ("--optimize" in sys.argv) or (len(sys.argv) == 1): + if ("--optimize" in sys.argv) or runall: print "\n#######################################" print "\n%s Running Optimize" %(get_timestamp()) if not optimize(): @@ -101,13 +113,13 @@ def run_stuff(): else: return True - if ("--backup" in sys.argv) or (len(sys.argv) == 1): + if ("--backup" in sys.argv) or runall: print "\n#######################################" print "\n%s Running Backup" %(get_timestamp()) if not os.system('/usr/LH/bin/lh_system_backup_job'): print "\nFinished Backup" - if ("--update" in sys.argv) or (len(sys.argv) == 1): + if ("--update" in sys.argv) or runall: print "\n#######################################" print "\n%s Running System Update" %(get_timestamp()) if not os.system('/usr/LH/bin/lh_system_host_update'): |