This commit is contained in:
midoks
2022-06-19 00:50:06 +08:00
parent 6516d9d8c8
commit afcbcf3779
2 changed files with 18 additions and 18 deletions
+15 -15
View File
@@ -312,34 +312,34 @@ def scriptIncr():
if __name__ == "__main__":
func = sys.argv[1]
if func == 'status':
print status()
print(status())
elif func == 'start':
print start()
print(start())
elif func == 'stop':
print stop()
print(stop())
elif func == 'restart':
print restart()
print(restart())
elif func == 'reload':
print reload()
print(reload())
elif func == 'initd_status':
print initdStatus()
print(initdStatus())
elif func == 'initd_install':
print initdInstall()
print(initdInstall())
elif func == 'initd_uninstall':
print initdUinstall()
print(initdUinstall())
elif func == 'run_log':
print getLog()
print(getLog())
elif func == 'collection_list':
print collectionList()
print(collectionList())
elif func == 'add_collection':
print addCollection()
print(addCollection())
elif func == 'remove_collection':
print removeCollection()
print(removeCollection())
elif func == 'conf_file_collection':
print confFileCollection()
print(confFileCollection())
elif func == 'script_full':
print scriptFull()
print(scriptFull())
elif func == 'script_incr':
print scriptIncr()
print(scriptIncr())
else:
print 'error'
+3 -3
View File
@@ -80,9 +80,9 @@ def execShell(cmdstring, cwd=None, timeout=None, shell=True):
if timeout:
end_time = datetime.datetime.now() + datetime.timedelta(seconds=timeout)
sub = subprocess.Popen(cmdstring + ' > ' + logPath + ' 2>&1',
cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
cmd = cmdstring + ' > ' + logPath + ' 2>&1'
sub = subprocess.Popen(
cmd, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
while sub.poll() is None:
time.sleep(0.1)