From 2b18c90304a787775767dc52e30c942717b32f21 Mon Sep 17 00:00:00 2001 From: Karl Bertin Date: Sat, 1 Feb 2020 23:10:37 +0100 Subject: [PATCH] autotss.py updated: fixed the pathname manipulation for job scheduling with cron, thanks to Florent Carre `colundrum` and Karl Bertin `kvpb`. --- autotss.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autotss.py b/autotss.py index 6822be0..b5a8b7b 100755 --- a/autotss.py +++ b/autotss.py @@ -30,6 +30,9 @@ def importNewDevices(self): numNew = 0 # Check to make sure devices.ini exists, otherwise warn and continue without new devices + script_path = os.path.dirname(os.path.abspath( __file__ )) + print(script_path) + os.chdir(script_path) if os.path.isfile('devices.ini'): config = configparser.ConfigParser() config.read('devices.ini') @@ -258,8 +261,8 @@ def getScriptPath(self, userPath): return scriptPath def main(): - # autotss('/Users/codsane/tsschecker/tsschecker_macos') - autotss() + autotss('/usr/local/bin/tsschecker') + # autotss() if __name__ == "__main__": main() \ No newline at end of file