X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=5b887c2d10742c68d526bff9c5773c0d85e63603;hb=HEAD;hp=c6d3069de0bb65a746ec8a6c9b9dc97005fedc22;hpb=d0b7f1fc1b4a36dc26d6fcdf1134aa66f9638777;p=monit-cn.git diff --git a/debian/postinst b/debian/postinst index c6d3069..2e2af2f 100755 --- a/debian/postinst +++ b/debian/postinst @@ -33,6 +33,15 @@ if grep -q '@localhost' /etc/monit/monitrc; then /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' \