Compare commits
2 Commits
94ee8ae79a
...
4e99463b09
Author | SHA1 | Date |
---|---|---|
xyj | 4e99463b09 | |
xyj | d2c7f4f28c |
|
@ -7,7 +7,7 @@ autostart=true
|
||||||
;失败重启
|
;失败重启
|
||||||
autorestart=true
|
autorestart=true
|
||||||
;重启次数
|
;重启次数
|
||||||
restart_times=3
|
restart_times=10
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stopsignal=TERM
|
stopsignal=TERM
|
||||||
stopasgroup=True
|
stopasgroup=True
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
git add .
|
||||||
|
git commit -m 'update'
|
||||||
|
git push -f origin master
|
5
tool.py
5
tool.py
|
@ -19,7 +19,10 @@ def exec_sh(msg):
|
||||||
cmd = json.loads(msg.payload.decode('utf-8'))["data"]
|
cmd = json.loads(msg.payload.decode('utf-8'))["data"]
|
||||||
if cmd == "supervisorctl stop __mqtt__":
|
if cmd == "supervisorctl stop __mqtt__":
|
||||||
return
|
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():
|
def update():
|
||||||
|
|
Loading…
Reference in New Issue