add start.py stop.py

This commit is contained in:
huangsimin 2019-01-04 16:41:15 +08:00
parent 8090c12ef2
commit 85e3470980
3 changed files with 18 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
screenlog.*

9
start.py Executable file
View File

@ -0,0 +1,9 @@
import glob
import os
if __name__ == "__main__":
for p in glob.glob("./*"):
if os.path.isdir(p):
bn = os.path.basename(p)
os.system("cd {0} && go build ./ && screen -L -dmS {0} ./{0}".format(bn))

8
stop.py Executable file
View File

@ -0,0 +1,8 @@
import glob
import os
if __name__ == "__main__":
for p in glob.glob("./*"):
if os.path.isdir(p):
bn = os.path.basename(p)
os.system("cd {0} && screen -X -S {0} quit ".format(bn))