Include stderr
This commit is contained in:
parent
c89fc86812
commit
419498cae6
12
run.py
12
run.py
@ -1118,15 +1118,16 @@ def setup_client(pool):
|
||||
|
||||
fprint("VM online.")
|
||||
# Windows client setup
|
||||
from subprocess import PIPE
|
||||
fprint("Running full jukebox control system...")
|
||||
jb = subprocess.Popen("ssh root@192.168.1.25 -- /root/jukebox-software/run.sh".split(' '), stdout=PIPE, stderr=PIPE, bufsize=1, universal_newlines=True)
|
||||
jb = subprocess.Popen("ssh root@192.168.1.25 -- /root/jukebox-software/run.sh".split(' '), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True)
|
||||
for line in jb.stdout:
|
||||
print(line, end='')
|
||||
if line.find("Running mode: Idle") > 0:
|
||||
# Jukebox started
|
||||
break # continue with program
|
||||
|
||||
if jb.poll() is None:
|
||||
|
||||
fprint("Opening browser...")
|
||||
|
||||
firefox = webdriver.Firefox()
|
||||
@ -1143,9 +1144,10 @@ def setup_client(pool):
|
||||
if kill_ssh is True:
|
||||
break
|
||||
|
||||
|
||||
firefox.close()
|
||||
jb.terminate()
|
||||
run_cmd("Stop-VM -Name Jukebox*")
|
||||
#run_cmd("Stop-VM -Name Jukebox*")
|
||||
killall()
|
||||
|
||||
#firefox.execute_script('document.body.style.MozTransform = "scale(0.80)";')
|
||||
@ -1198,8 +1200,8 @@ def killall():
|
||||
|
||||
def killall_signal(a, b):
|
||||
global config
|
||||
if config["core"]["server"] == "Hyper-V":
|
||||
run_cmd("Stop-VM -Name Jukebox*") # any and all VMs starting with "Jukebox"
|
||||
#if config["core"]["server"] == "Hyper-V":
|
||||
#run_cmd("Stop-VM -Name Jukebox*") # any and all VMs starting with "Jukebox"
|
||||
if config["core"]["mode"] == "winclient":
|
||||
global kill_ssh
|
||||
kill_ssh = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user