diff --git a/templates/etc/systemd/system/semaphore.service.j2 b/templates/etc/systemd/system/semaphore.service.j2 index 49fa17a..3c58fb6 100644 --- a/templates/etc/systemd/system/semaphore.service.j2 +++ b/templates/etc/systemd/system/semaphore.service.j2 @@ -1,7 +1,10 @@ [Unit] Description=Ansible Semaphore Requires=network.target{% if SEM_CONFIG.manage.database %} mariadb@semaphore.service{% endif %} -{% if SEM_CONFIG.manage.webserver %}Wants=nginx.service{% endif %} + +{% if SEM_CONFIG.manage.webserver %} +Wants=nginx.service +{% endif %} ConditionPathExists={{ SEM_HC.bin }} ConditionPathExists={{ SEM_HC.config }} @@ -39,4 +42,4 @@ StandardError=journal SyslogIdentifier=semaphore [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target