From: Zeljko Boros Date: Fri, 16 Apr 2021 09:44:59 +0000 (+0200) Subject: Promjena templatea bacula-fd.conf u postinstu, izmjene u clamd.conf X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=f3b4f69281918c95d826f8c8a3ef45e799f76ac0;p=monit-cn.git Promjena templatea bacula-fd.conf u postinstu, izmjene u clamd.conf --- diff --git a/debian/changelog b/debian/changelog index 6eec1ec..7a43c4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ monit-cn (1:5.26.0+cn10u2) stable; urgency=low * Dodana konfiguracija za Bacula File Daemon + * Promjena templatea bacula-fd.conf u postinstu + * Ne provjerava se ClamAV-ov PID koji više ne postoji -- Zeljko Boros Tue, 13 Apr 2021 13:53:50 +0200 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' \ diff --git a/monit-cn/clamd.conf b/monit-cn/clamd.conf index f81fcc1..7a07191 100644 --- a/monit-cn/clamd.conf +++ b/monit-cn/clamd.conf @@ -5,7 +5,7 @@ # ## End - Generated by CARNet package monit-cn -check process clamd with pidfile "/var/run/clamav/clamd.pid" +check process clamd matching "/usr/sbin/clamd" start program = "/etc/init.d/clamav-daemon start" stop program = "/etc/init.d/clamav-daemon stop" if failed unixsocket "/var/run/clamav/clamd.ctl"