From 14c204cd74fa91a017723dc4dc9e9b0c902c09a9 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 2 Feb 2020 22:32:19 +0000 Subject: [PATCH 1/1] systemd: add dropin support for exec actions --- cookbooks/systemd/templates/default/service.erb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cookbooks/systemd/templates/default/service.erb b/cookbooks/systemd/templates/default/service.erb index 0d4abbcef..4828c96af 100644 --- a/cookbooks/systemd/templates/default/service.erb +++ b/cookbooks/systemd/templates/default/service.erb @@ -49,18 +49,33 @@ Group=<%= @group %> WorkingDirectory=<%= @working_directory %> <% end -%> <% if @exec_start_pre -%> +<% if @dropin -%> +ExecStartPre= +<% end -%> ExecStartPre=<%= @exec_start_pre %> <% end -%> <% if @exec_start -%> +<% if @dropin -%> +ExecStart= +<% end -%> ExecStart=<%= @exec_start %> <% end -%> <% if @exec_start_post -%> +<% if @dropin -%> +ExecStartPost= +<% end -%> ExecStartPost=<%= @exec_start_post %> <% end -%> <% if @exec_stop -%> +<% if @dropin -%> +ExecStop= +<% end -%> ExecStop=<%= @exec_stop %> <% end -%> <% if @exec_reload -%> +<% if @dropin -%> +ExecReload= +<% end -%> ExecReload=<%= @exec_reload %> <% end -%> <% if @runtime_directory -%> -- 2.39.5