Commit 3954e0b8 authored by Benjamin Baer's avatar Benjamin Baer
Browse files

logoutuser force option

parent c8060455
......@@ -31,7 +31,16 @@ class LogoutUser(managementagent.RabbitModule):
username = instructions['username']
logger.debug('trying to find screensaver for %s', username)
process = subprocess.Popen(['/usr/bin/pkill', '-u', username])
if instructions['force'] is set:
force = instructions['force']
force = False
if force == True:
process = subprocess.Popen(['/usr/bin/pkill', '-u', username, '-KILL'])
process = subprocess.Popen(['/usr/bin/pkill', '-u', username])
if process.returncode != 0:
Supports Markdown
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