Commit 971cb575 authored by Joe Lyons's avatar Joe Lyons

Stop printing status, we know it works and we have logs

parent 7f27aeb9
......@@ -51,7 +51,7 @@ for sessions in stdoutdata.splitlines():
# If suspended and old than specified age, terminate.
if session['state'] == "S":
if session_time_day > stale_age:
print("Terminating %s. Suspended for %i days" % (session['user'], session_time_day))
# print("Terminating %s. Suspended for %i days" % (session['user'], session_time_day))
# Log
journal.send('Terminating x2go session %s for user %s. It was suspended for %i days.' % (session['session_id'],session['user'],session_time_day), SYSLOG_IDENTIFIER='x2go_clean_sessions')
output = subprocess.run(["sudo", "-u", str(session['user']), "/usr/bin/x2goterminate-session", session['session_id']])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment