mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
more
This commit is contained in:
parent
6a896c6dad
commit
01312a8452
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ def stop_websockify():
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
if subprocess.run(['pgrep', 'websockify'],
|
if subprocess.run(['pgrep', 'websockify'],
|
||||||
stdout=subprocess.PIPE).stdout:
|
stdout=subprocess.PIPE).stdout:
|
||||||
logging.info('websockify didn\'t stop, killing forcefully.')
|
logging.info('websockify didn\'t stop, killing forcefully')
|
||||||
subprocess.run(['kill', '-9', pid], stdout=subprocess.PIPE)
|
subprocess.run(['kill', '-9', pid], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ def stop_ssh_tunnel(vmid, ssh_tunnels):
|
||||||
(tunnel for tunnel in ssh_tunnels if tunnel.local_bind_port == port),
|
(tunnel for tunnel in ssh_tunnels if tunnel.local_bind_port == port),
|
||||||
None)
|
None)
|
||||||
if tunnel:
|
if tunnel:
|
||||||
logging.info("tearing down SSH tunnel for VM %s", vmid)
|
logging.info('tearing down SSH tunnel for VM %s', vmid)
|
||||||
try:
|
try:
|
||||||
tunnel.stop()
|
tunnel.stop()
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue