From: Dinko Korunic Date: Thu, 25 Oct 2007 19:05:25 +0000 (+0000) Subject: r16: - replace (root|monit)@localhost into (root|monit)@fqdn X-Git-Tag: v4.10.1-3~21 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=monit-cn.git;a=commitdiff_plain;h=5212d51fc40173b98d63228a20a10fb8b1610dde r16: - replace (root|monit)@localhost into (root|monit)@fqdn - fix typos (pop3 -> pop) in dovecot/qpopper --- diff --git a/debian/changelog b/debian/changelog index 93a907f..b074ff3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monit-cn (1:4.8.1-2) stable; urgency=low + + * promijeni (root|monit)@localhost u (root|monit)@fqdn u monitrc + * popravljen typo u dovecot.conf/qpopper.conf + + -- Dinko Korunic Thu, 25 Oct 2007 20:47:13 +0200 + monit-cn (1:4.8.1-1) stable; urgency=low * dodan postgrey servis diff --git a/debian/postinst b/debian/postinst index e665ab6..e5edbbb 100755 --- a/debian/postinst +++ b/debian/postinst @@ -47,6 +47,15 @@ if [ $installfile -eq 1 ]; then chmod u=rw,go= /etc/monit/monitrc fi +# sed monitrc with proper hostname +if grep -q '@localhost' /etc/monit/monitrc; then + CARNET_HOSTNAME=`hostname` + CARNET_DOMAINNAME=`hostname --domain` + cp_check_and_sed '@localhost' \ + "s/@localhost/@$CARNET_HOSTNAME.$CARNET_DOMAINNAME/g" \ + /etc/monit/monitrc || true +fi + # (re)generate monit.d files update-monit.d || true diff --git a/monit-cn/dovecot.conf b/monit-cn/dovecot.conf index 7f7dfb5..3cfdfec 100644 --- a/monit-cn/dovecot.conf +++ b/monit-cn/dovecot.conf @@ -6,5 +6,5 @@ check process dovecot with pidfile "/var/run/dovecot/master.pid" stop program = "/etc/init.d/dovecot stop" if failed host 127.0.0.1 port 143 protocol imap then restart - if failed host 127.0.0.1 port 110 protocol pop3 + if failed host 127.0.0.1 port 110 protocol pop then restart diff --git a/monit-cn/qpopper.conf b/monit-cn/qpopper.conf index 8494c28..1ee0b81 100644 --- a/monit-cn/qpopper.conf +++ b/monit-cn/qpopper.conf @@ -4,5 +4,5 @@ check process qpopper with pidfile "/var/run/popper.pid" group mail start program = "/etc/init.d/qpopper start" stop program = "/etc/init.d/qpopper stop" - if failed host 127.0.0.1 port 110 type pop3 + if failed host 127.0.0.1 port 110 protocol pop then restart