Skip to content

Commit

Permalink
do not wipe pidfile default on FreeBSD
Browse files Browse the repository at this point in the history
otherwise `service mosquitto status` doesn't work
  • Loading branch information
evgeni committed Feb 25, 2023
1 parent d0cec1f commit eae4129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion manifests/config.pp
Expand Up @@ -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 }),
}
}

0 comments on commit eae4129

Please sign in to comment.