From eae4129135fe837d7f78ed85f55fb8ac22e11f65 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Sat, 25 Feb 2023 13:09:19 +0100 Subject: [PATCH] do not wipe pidfile default on FreeBSD otherwise `service mosquitto status` doesn't work --- manifests/config.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/config.pp b/manifests/config.pp index f119521..d3de953 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -13,14 +13,16 @@ case $facts['os']['family'] { 'FreeBSD': { $etc_prefix = '/usr/local/etc' + $default_config = ['pid_file /var/run/mosquitto.pid'] } default: { $etc_prefix = '/etc' + $default_config = [] } } file { "${etc_prefix}/mosquitto/mosquitto.conf": ensure => bool2str($mosquitto::package_ensure == 'absent', 'absent', 'file'), - content => epp("${module_name}/mosquitto.conf", { 'config' => $config }), + content => epp("${module_name}/mosquitto.conf", { 'config' => $config + $default_config }), } }