run script
fix server restart
This commit is contained in:
parent
9b7dab692b
commit
99db626225
4 changed files with 13 additions and 1 deletions
|
@ -118,7 +118,7 @@ class DbTransfer(object):
|
|||
logging.info('db stop server at port [%s] reason: password changed' % (port,))
|
||||
ServerPool.get_instance().del_server(port)
|
||||
|
||||
if allow and ServerPool.get_instance().server_is_run(port) == 0:
|
||||
elif allow and ServerPool.get_instance().server_run_status(port) is False:
|
||||
logging.info('db start server at port [%s] pass [%s]' % (port, passwd))
|
||||
ServerPool.get_instance().new_server(port, passwd)
|
||||
|
||||
|
|
6
run.sh
Normal file
6
run.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
eval $(ps -ef | grep "[0-9] python server\\.py" | awk '{print "kill "$2}')
|
||||
nohup python server.py >> ssserver.log 2>&1 &
|
||||
|
||||
tail -f ssserver.log
|
3
stop.sh
Normal file
3
stop.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
eval $(ps -ef | grep "[0-9] python server\\.py" | awk '{print "kill "$2}')
|
3
tail.sh
Normal file
3
tail.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
tail -f ssserver.log
|
Loading…
Add table
Add a link
Reference in a new issue