From db6595d2845146ca9a608830bad2aba114657767 Mon Sep 17 00:00:00 2001 From: simonfelding <45149055+simonfelding@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:30:58 +0100 Subject: [PATCH 1/2] instead of restarting it if config changes. --- manifests/init.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 428f7b5..317907e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -204,6 +204,9 @@ # @param service_hasrestart # Service has restart command. # +# @param service_restart +# Restart command for service. +# # @param snmptrapd_options # Commandline options passed to snmptrapd via init script. # @@ -328,6 +331,7 @@ Boolean $trap_service_enable = false, Boolean $trap_service_hasstatus = true, Boolean $trap_service_hasrestart = true, + String[1] $service_restart = "/bin/systemctl reload $service_name", Boolean $openmanage_enable = false, Boolean $master = false, Optional[Stdlib::Filemode] $agentx_perms = undef, @@ -555,6 +559,7 @@ enable => $service_enable_real, hasstatus => $service_hasstatus, hasrestart => $service_hasrestart, + restart => $service_restart, require => File['var-net-snmp'], subscribe => File['snmpd.conf'], } From 3bcb7d2d5396f522456250a4db70ffff4bccf8a5 Mon Sep 17 00:00:00 2001 From: simonfelding <45149055+simonfelding@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:57:28 +0100 Subject: [PATCH 2/2] implement requested change Co-authored-by: Kenyon Ralph --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 317907e..6ab0bec 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -331,7 +331,7 @@ Boolean $trap_service_enable = false, Boolean $trap_service_hasstatus = true, Boolean $trap_service_hasrestart = true, - String[1] $service_restart = "/bin/systemctl reload $service_name", + String[1] $service_restart = "/bin/systemctl reload ${service_name}", Boolean $openmanage_enable = false, Boolean $master = false, Optional[Stdlib::Filemode] $agentx_perms = undef,