# pandora gunicorn daemon # description "pandora daemon" start on runlevel [2345] stop on runlevel [!2345] kill timeout 5 respawn env VENV=/srv/pandora env USER=pandora env HOME=/home/pandora env LANG=en_US.UTF-8 pre-start script test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora) test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora) cd $VENV/pandora /usr/bin/sudo -u $USER ./manage.py compile_pyc -p $VENV/pandora end script exec start-stop-daemon \ --start -c $USER -d $VENV/pandora --exec \ $VENV/bin/gunicorn -- \ wsgi:application \ --bind 127.0.0.1:2620 \ --timeout 90 \ --max-requests 1000 \ -p /var/run/pandora/pandora.pid \ --log-level info --log-file /var/log/pandora/pandora.log \ --workers 5