We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2008ff9 + b5d483d commit b404856Copy full SHA for b404856
templates/service/systemd.service.j2
@@ -21,8 +21,13 @@ After=multi-user.target
21
22
[Service]
23
Type=simple
24
-ExecStartPre=/bin/rm -f {{ deploy_dir_app }}/RUNNING_PID
+Restart=on-failure
25
+{% if deploy_log_stdout == True or deploy_log_stderr == True %}
26
+ExecStart=/bin/sh -c "{{ deploy_dir_app }}/{{ deploy_service_start_command }} {% if deploy_log_stdout == True %}1> {{ deploy_log_stdout_path }}{% endif %} {% if deploy_log_stderr == True %}2>{{ deploy_log_stderr_path }}{% endif %}"
27
+{% else %}
28
ExecStart={{ deploy_dir_app }}/{{ deploy_service_start_command }}
29
+{% endif %}
30
+ExecStopPost=/bin/rm -f {{ deploy_dir_app }}/RUNNING_PID
31
WorkingDirectory={{ deploy_dir_app }}
32
User={{ deploy_app_user }}
33
Group={{ deploy_app_group }}
0 commit comments