增加服务操作脚本

dependabot/npm_and_yarn/fir_admin/ws-5.2.3
youngS 3 years ago
parent f7f0896893
commit cad1a77f8f
  1. 25
      fir_ser/flyapp.sh

@ -0,0 +1,25 @@
#!/bin/bash
#
source /www/flyapps/py3/bin/activate && cd /www/flyapps/fir_ser/
chown www.www -R /www/flyapps/fir_ser/
stop(){
pgrep -f uwsgi |xargs -i kill {}
sleep 1
pgrep -f celery |xargs -i kill {}
}
start(){
uwsgi --ini uwsgi.conf
sleep 1
celery multi start 4 -A fir_ser -l INFO -c4 --pidfile=/var/run/celery/%n.pid --logfile=logs/%p.log
sleep 1
nohup celery -A fir_ser beat --uid=1000 --pidfile=logs/beat.pid --scheduler django -l INFO --logfile=logs/beat.log &
}
restart(){
stop
sleep 1
start
}
$@
Loading…
Cancel
Save