/etc/monit/monitrc || true
fi
+# sed bacula-fd.conf with proper hostname
+if grep -q '127.0.0.1' /usr/share/monit-cn/bacula-fd.conf; then
+ cp_check_and_sed '127.0.0.1' \
+ "s/127.0.0.1/$CARNET_HOSTNAME.$CARNET_DOMAINNAME/" \
+ /usr/share/monit-cn/bacula-fd.conf || true
+fi
+
+# you can modify others in a loop, maybe?
+
# migrate to "but not on { instance }" alerting style
cp_check_and_sed '^set alert [^[:space:]]*@[^[:space:]]* ' \
's/^set alert \([^[:space:]]*@[^[:space:]]*\) .*$/set alert \1 but not on { instance }/g' \