Promjena templatea bacula-fd.conf u postinstu, izmjene u clamd.conf
[monit-cn.git] / debian / postinst
index c6d3069..2e2af2f 100755 (executable)
@@ -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' \