modify(with 0e9a962506) 变更启动脚本

1. 启动时添加 django crontab
2. 关闭时删除 django crontab
pull/134/head
ibuler 2016-02-23 18:46:00 +08:00
parent dee1d31fc0
commit d4b1bdef8e
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ start() {
success "$jump_start"
else
daemon python $base_dir/manage.py runserver 0.0.0.0:80 &>> /tmp/jumpserver.log 2>&1 &
daemon python $base_dir/manage.py crontab add &>> /tmp/jumpserver.log 2>&1
daemon python $base_dir/run_websocket.py &> /dev/null 2>&1 &
sleep 4
@ -53,6 +54,7 @@ stop() {
echo -n $"Stopping ${PROC_NAME} service:"
daemon python $base_dir/manage.py crontab remove &>> /tmp/jumpserver.log 2>&1
ps aux | grep -E 'manage.py|run_websocket.py' | grep -v grep | awk '{print $2}' | xargs kill -9 &> /dev/null
ret=$?