Compare commits

...

2 Commits

Author SHA1 Message Date
xyj 4e99463b09 update 2023-12-05 09:09:44 +08:00
xyj d2c7f4f28c test 2023-12-05 09:08:53 +08:00
3 changed files with 10 additions and 2 deletions

View File

@ -7,7 +7,7 @@ autostart=true
;失败重启
autorestart=true
;重启次数
restart_times=3
restart_times=10
redirect_stderr=true
stopsignal=TERM
stopasgroup=True

5
push.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e
git add .
git commit -m 'update'
git push -f origin master

View File

@ -19,7 +19,10 @@ def exec_sh(msg):
cmd = json.loads(msg.payload.decode('utf-8'))["data"]
if cmd == "supervisorctl stop __mqtt__":
return
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()
output = out.decode('utf-8')
print(output)
def update():