18 lines
643 B
Django/Jinja
18 lines
643 B
Django/Jinja
[Unit]
|
|
Description=gunicorn daemon for {{supysonic_name}}
|
|
After=network.target {{ 'postgresql.service' if supysonic_DB_type == 'postgres' else mysqld.service }}
|
|
|
|
[Service]
|
|
PIDFile=/run/gunicorn-{{supysonic_name}}/pid
|
|
User={{exec_user}}
|
|
Group={{exec_group}}
|
|
RuntimeDirectory=gunicorn-{{supysonic_name}}
|
|
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
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|