Swap user and cid position for service file naming

- allows better globbing for manual intervention if required
This commit is contained in:
Square Root 2021-03-12 18:23:19 +05:30
parent b29d97d28a
commit 6c52ab58b5
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ runner = str(Path(BASEPATH, "markattendance.py"))
def Schedule(time, user, cid, day, capture_output=True):
command = [sys.executable, runner, user, cid, str(day)]
servicename = "att_{}_{}".format(user, cid)
servicename = "att_{}_{}".format(cid, user)
restartIntervalMinutes = 1
# restartAttemptCount = 5
@ -35,7 +35,7 @@ def Schedule(time, user, cid, day, capture_output=True):
sch = subprocess.run( schedulecmd, capture_output=capture_output)
return sch
def cancelSchedule(user, cid, capture_output=True):
servicename = "att_{}_{}.timer".format(user, cid)
servicename = "att_{}_{}.timer".format(cid, user)
schedulecmd = ['systemctl',
'--user',