Adding path to console connections
parent
bf82996753
commit
9e817169ca
2
app.py
2
app.py
|
@ -234,7 +234,7 @@ def ter_connect():
|
||||||
def consolelxc():
|
def consolelxc():
|
||||||
lxc_name = request.form['lxc_name']
|
lxc_name = request.form['lxc_name']
|
||||||
try:
|
try:
|
||||||
pyxterm_connect(lxc_name)
|
pyxterm_connect(path,lxc_name)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
return render_template('terminal.html')
|
return render_template('terminal.html')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -20,6 +20,6 @@ def socket_connect(vm_name):
|
||||||
vm_port = get_vnc_port(vm_name)
|
vm_port = get_vnc_port(vm_name)
|
||||||
os.system('websockify -D --web=/usr/share/novnc/ 6080 localhost:'+vm_port)
|
os.system('websockify -D --web=/usr/share/novnc/ 6080 localhost:'+vm_port)
|
||||||
|
|
||||||
def pyxterm_connect(lxc_name):
|
def pyxterm_connect(path,lxc_name):
|
||||||
kill_consoles()
|
kill_consoles()
|
||||||
os.system('python3 pyxterm.py --command \'lxc-attach\' --cmd-args \''+lxc_name+'\' &')
|
os.system('python3 '+path+'/pyxterm.py --command \'lxc-attach\' --cmd-args \''+lxc_name+'\' &')
|
||||||
|
|
Loading…
Reference in New Issue