|
@@ -94,7 +94,13 @@ class Host(Thread):
|
|
|
def xstop(self):
|
|
|
if self.up:
|
|
|
if self.running:
|
|
|
- stopcmd = "pkill xfreerdp"
|
|
|
+ # Try to kill sending SIGTERM, wait, check if running and if so issue SIGKILL.
|
|
|
+ # (Do this asynchronously, on the remote node)
|
|
|
+ stopcmd = '''PCMDL="/usr/bin/xfreerdp /cert-ignore /f /v:tolab.fisica.unimi.it"
|
|
|
+ pkill -xf "$PCMDL"
|
|
|
+ sleep 5
|
|
|
+ pgrep -xf "$PCMDL" && \
|
|
|
+ pkill -9 -xf "$PCMDL"'''
|
|
|
self.sshcommand(stopcmd)
|
|
|
print 'xfreerdp stopped on ' + self.hostname
|
|
|
else:
|