supysonic/templates/systemd/supysonic-daemon.service.j2

17 lines
486 B
Plaintext
Raw Normal View History

2019-11-17 16:12:24 +00:00
[Unit]
Description=Supysonic Daemon
2020-11-04 17:24:58 +00:00
After={{ 'postgresql.service' if supysonic_DB_type == 'postgres' else mysqld.service supysonic_DB_type == 'mysql' }}
2020-01-19 12:41:09 +00:00
After=network.target
2019-11-17 16:12:24 +00:00
[Service]
User=root
2020-01-19 12:41:09 +00:00
Restart=always
RestartSec=2s
2019-11-17 16:12:24 +00:00
Group=root
WorkingDirectory={{source_location}}/{{supysonic_name}}
ExecStart={{venv_location}}{{supysonic_venv_name}}/bin/python -m supysonic.daemon
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target