Files
@ 592bcf2e1517
Branch filter:
Location: FVDE/ennstatus/Scripts/init_script_gunicorn.sh - annotation
592bcf2e1517
769 B
text/x-sh
added init script for gunicorn
592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 592bcf2e1517 | NAME=ennstatus
DESC=ennstatus
start () {
echo "Starting ennstatus"
source /var/www/enn.lu/ennstatus/bin/activate
gunicorn -w 4 --chdir /var/www/enn.lu/ennstatus/chroot/ -D -p /var/run/ennstatus.pid -u www-data -g www-data -e ENNSTATUS_SETTINGS=/var/www/enn.lu/ennstatus/chroot/config.py -b 127.0.0.1 ennstatus:app
return
}
stop () {
echo "Killing ennstatus"
kill $(cat /var/run/ennstatus.pid)
}
case "$1" in
start)
echo "Starting $DESC"
start
;;
stop)
echo "Stopping $DESC"
stop
;;
restart)
echo "Restarting $DESC"
stop
sleep 1
start
;;
*)
echo "Usage: ennstatus {start|stop|restart}"
exit 1
;;
esac
exit 0
|