From f3b4f69281918c95d826f8c8a3ef45e799f76ac0 Mon Sep 17 00:00:00 2001 From: Zeljko Boros Date: Fri, 16 Apr 2021 11:44:59 +0200 Subject: [PATCH] Promjena templatea bacula-fd.conf u postinstu, izmjene u clamd.conf --- debian/changelog | 2 ++ debian/postinst | 9 +++++++++ monit-cn/clamd.conf | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) 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" -- 1.7.10.4