Skip to content

Commit 70427b7

Browse files
authored
Merge pull request #28 from bluecare/fix-upstart-losing-track-of-process
Fix running job as different user
2 parents 08bb8be + bf6f381 commit 70427b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/service/upstart.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
description "{{ deploy_service_description }}"
1818
author "https://github.com/acme-software/ansible-java-deployment"
19-
version 1.0.1
19+
version 1.0.2
2020

2121
# Respawn parameters with limit: dies 3 times within 60 seconds
2222
respawn
@@ -47,7 +47,7 @@ end script
4747
{% endif %}
4848

4949
# Execute deploy_service_start_command and log stdout
50-
exec su -s /bin/sh -c '{{ 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 %}' {{ deploy_app_user }}
50+
exec su -s /bin/sh -c 'exec "$0" "$@" {% if deploy_log_stdout == True %}1>>{{ deploy_log_stdout_path }}{% endif %} {% if deploy_log_stderr == True %}2>>{{ deploy_log_stderr_path }}{% endif %}' {{ deploy_app_user }} -- {{ deploy_service_start_command }} -b wibble
5151

5252
{% if deploy_service_has_prestop_script == True %}
5353
# Pre-Stop Script

0 commit comments

Comments
 (0)