This commit is contained in:
xyj 2023-12-07 09:29:13 +08:00
parent 24be9201aa
commit 68072b177b
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ def exec_sh(msg, client):
if cmd == "supervisorctl stop __mqtt__" or cmd == "supervisorctl restart __mqtt__": if cmd == "supervisorctl stop __mqtt__" or cmd == "supervisorctl restart __mqtt__":
return return
if cmd == "supervisorctl reload": if cmd == "supervisorctl reload":
client.publish('success', payload='reloading', qos=0)
subprocess.Popen([cmd], shell=True) subprocess.Popen([cmd], shell=True)
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)