diff --git a/templates/systemd/gunicorn.service.j2 b/templates/systemd/gunicorn.service.j2 index ca6f7f3..dc7d1b3 100644 --- a/templates/systemd/gunicorn.service.j2 +++ b/templates/systemd/gunicorn.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=gunicorn daemon for {{supysonic_name}} -After=network.target +After=network.target {{ 'postgresql.service' if supysonic_DB_type == 'postgres' else mysqld.service supysonic_DB_type == 'mysql' }} [Service] PIDFile=/run/gunicorn-{{supysonic_name}}/pid diff --git a/templates/systemd/supysonic-daemon.service.j2 b/templates/systemd/supysonic-daemon.service.j2 index 36fb707..bd4ec33 100644 --- a/templates/systemd/supysonic-daemon.service.j2 +++ b/templates/systemd/supysonic-daemon.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Supysonic Daemon -After=mariadb.service +After={{ 'postgresql.service' if supysonic_DB_type == 'postgres' else mysqld.service supysonic_DB_type == 'mysql' }} After=network.target [Service] User=root