mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
408 B
25 lines
408 B
#!/bin/bash
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
|
|
|
|
|
|
|
mw_start(){
|
|
gunicorn -c setting.py app:app &
|
|
python task.py &
|
|
}
|
|
|
|
|
|
mw_stop()
|
|
{
|
|
ps -ef|grep app:app |grep -v grep|awk '{print $2}'|xargs kill -9
|
|
ps -ef|grep task.py |grep -v grep|awk '{print $2}'|xargs kill -9
|
|
}
|
|
|
|
case "$1" in
|
|
'start') mw_start;;
|
|
'stop') mw_stop;;
|
|
'restart')
|
|
mw_stop
|
|
mw_start
|
|
;;
|
|
esac |