supysonic/templates/systemd/gunicorn.service.j2
2019-05-13 19:00:10 +02:00

16 lines
502 B
Django/Jinja

[Unit]
Description=gunicorn daemon for {{supysonic_name}}
After=network.target
[Service]
PIDFile=/run/gunicorn-{{supysonic_name}}/pid
User={{exec_user}}
Group={{exec_group}}
RuntimeDirectory=gunicorn
WorkingDirectory={{source_location}}/{{supysonic_name}}/cgi-bin
ExecStart={{venv_location}}{{supysonic_venv_name}}/bin/gunicorn -b 0.0.0.0:8001 --workers=4 --pid /run/gunicorn-{{supysonic_name}}/pid server:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true