From 4c2e200e164162c0c2a3a5c8af74d649b4474875 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Thu, 5 Dec 2024 10:18:44 +0100 Subject: [PATCH] fix: avoid using wildcard in include folder syntax Older monit versions (e.g. default version in debian bullseye) interpret the wildcard `*` as a literal char, and it causes the service to not start. --- src/packaging/postinstall | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packaging/postinstall b/src/packaging/postinstall index b4e379b..89e3d65 100755 --- a/src/packaging/postinstall +++ b/src/packaging/postinstall @@ -30,9 +30,9 @@ if [ -f "$MONITRC" ]; then # So delete the line as it will be replaced with a similar line afterwards sed -i 's|^include /etc/monit/conf.d/\*$||g' "$MONITRC" - if ! grep -q "include /etc/monit/conf.d/\*" "$MONITRC"; then + if ! grep -q "include /etc/monit/conf.d/" "$MONITRC"; then echo "Adding /etc/monit/conf.d/ to the monit config ($MONITRC)" >&2 - echo 'include /etc/monit/conf.d/*.conf' >> "$MONITRC" + echo 'include /etc/monit/conf.d/' >> "$MONITRC" fi fi