update
This commit is contained in:
parent
c50880b8ae
commit
2e8fe15fc7
1
tool.py
1
tool.py
|
@ -27,7 +27,6 @@ def exec_sh(msg, client):
|
||||||
return
|
return
|
||||||
if cmd == "supervisorctl restart __mqtt__" or cmd == "supervisorctl reload":
|
if cmd == "supervisorctl restart __mqtt__" or cmd == "supervisorctl reload":
|
||||||
subprocess.Popen([cmd], shell=True)
|
subprocess.Popen([cmd], shell=True)
|
||||||
client.publish('success', payload='Exec Success!', qos=0)
|
|
||||||
return
|
return
|
||||||
p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
|
|
Loading…
Reference in New Issue