From 9a03fc2fd572ff832e98756f561ff5292076d3e3 Mon Sep 17 00:00:00 2001 From: Thodoris Sotiropoulos Date: Fri, 12 Jul 2019 23:26:32 +0300 Subject: [PATCH] Refresh service when there is an update in init script E.g., when the `service` provider is init-based. --- manifests/instance/config.pp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/manifests/instance/config.pp b/manifests/instance/config.pp index e6697f2..e0b99e9 100644 --- a/manifests/instance/config.pp +++ b/manifests/instance/config.pp @@ -328,11 +328,16 @@ seltype => $seltype, } - if $::operatingsystem == 'Debian' and $::tomcat::params::systemd { - include ::systemd - File["/etc/init.d/tomcat-${name}"] - ~> Exec['systemctl-daemon-reload'] - ~> Tomcat::Instance::Service[$title] + if $::operatingsystem == 'Debian' { + if $::tomcat::params::systemd { + include ::systemd + File["/etc/init.d/tomcat-${name}"] + ~> Exec['systemctl-daemon-reload'] + ~> Tomcat::Instance::Service[$title] + } else { + File["/etc/init.d/tomcat-${name}"] + ~> Tomcat::Instance::Service[$title] + } } } }