Bugfix: compatability for older systemd versions
- Older systemd versions do not support RestartPreventExitStatus - Use exit code 0 to abort, but record code 2 in db as a workaround
This commit is contained in:
parent
b82979c5e2
commit
dec6c81510
|
@ -23,6 +23,8 @@ fullurl = BASEURL + "/mod/attendance/view.php?id=" + cid
|
|||
def recordSchedule(db,tries,status):
|
||||
# TODO: validate response
|
||||
db.recordSchedule(day, username, cid, tries, status)
|
||||
if status == 2:
|
||||
exit(0)
|
||||
exit(status)
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ def Schedule(time, user, cid, day, capture_output=True):
|
|||
'--unit', servicename,
|
||||
'--on-calendar', time,
|
||||
'--property', "Restart=on-failure",
|
||||
'--property', "RestartPreventExitStatus=2",
|
||||
# '--property', "RestartPreventExitStatus=2",
|
||||
'--property', propResartSec,
|
||||
# '--property', propStartLimitIntervalSec,
|
||||
# '--property', propStartLimitBurst,
|
||||
|
|
Loading…
Reference in New Issue