diff --git a/templates/agent/check_mk.service-drop-in.epp b/templates/agent/check_mk.service-drop-in.epp index 8472efd..dfa7239 100644 --- a/templates/agent/check_mk.service-drop-in.epp +++ b/templates/agent/check_mk.service-drop-in.epp @@ -5,7 +5,12 @@ | -%> # THIS FILE IS MANAGED BY PUPPET [Service] +# Reset command list. +# See https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= +# "If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect". ExecStart= -ExecStart=<%= $server %> +# "-" path prefix makes systemd record the exit code, +# but the unit is not set to failed. +ExecStart=-<%= $server %> User=<%= $user %> Group=<%= $group %>