Za sljedece servise dolaze gotovi predlosci:
- amavisd.conf dsmc.conf ntp-server.conf saslauthd.conf
- aosi.conf exim.conf ntp.conf sendmail.conf
- apache1.conf freeradius.conf openldap.conf snmpd.conf
- apache2.conf mailgraph.conf pdns-recursor.conf sophie.conf
- asterisk.conf mailman.conf pdns.conf sshd.conf
- bind8.conf maradns-zoneserver.conf postfix.conf syslogd.conf
- bind9.conf maradns.conf postgrey.conf thttpd.conf
- clamd.conf monitrc proftpd.conf tomcat5.conf
- cron.conf mysqld.conf qpopper.conf vsftpd.conf
- dhcpd3.conf nginx.conf rsyslogd.conf
- dovecot.conf nsd3.conf samba.conf
+ amavisd.conf nsd3.conf
+ aosi.conf ntp.conf
+ aosi-old.conf ntp-server.conf
+ apache1.conf openldap.conf
+ apache2.conf pdns.conf
+ asterisk.conf pdns-recursor.conf
+ bind8.conf postfix.conf
+ bind9.conf postgrey.conf
+ bind9-lenny.conf proftpd.conf
+ bind9-lennyold.conf qpopper.conf
+ clamd.conf rsyslogd.conf
+ cron.conf samba.conf
+ dhcpd3.conf saslauthd.conf
+ dovecot.conf sendmail.conf
+ dsmc.conf snmpd.conf
+ exim.conf sophie.conf
+ freeradius.conf sshd.conf
+ mailgraph.conf syslogd.conf
+ mailman.conf thttpd.conf
+ maradns.conf tomcat5.conf
+ maradns-zoneserver.conf vsftpd.conf
+ mysqld.conf zabbix-agent.conf
+ nginx.conf
Primijetite da je monit respawnable proces -- on ne starta kroz
/etc/init.d/monit skripte (tzv. System V init skripte), vec kroz
"padne" ili ga nehotice netko "ubije", on ce se automatski odmah pokrenuti
nazad.
- -- Dinko Korunic <kreator@CARNet.hr> Wed, 27 Apr 2011 18:45:06 +0200
+ -- Dinko Korunic <kreator@CARNet.hr> Thu, 15 Aug 2013 18:01:51 +0200
+monit-cn (1:5.4.0) stable; urgency=low
+
+ * prilagodbe za Wheezy
+ * dodan Zabbix-agent
+ * /etc/monit.d je preseljen u /etc/monit/conf.d sa svim konfiguracijskim datotekama
+
+ -- Dinko Korunic <kreator@carnet.hr> Thu, 15 Aug 2013 18:34:42 +0200
+
monit-cn (1:5.1.3) stable; urgency=low
* novi Aosi template zbog promjena naziva init skripte
Section: net
Priority: optional
Maintainer: Dinko Korunic <kreator@CARNet.hr>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 9.20120909)
+Standards-Version: 3.9.4
Package: monit-cn
Architecture: all
-Depends: monit (>= 1:5.1.1-1), carnet-tools-cn (>= 2.8.1), gawk | mawk, ${misc:Depends}
+Depends: monit (>= 1:5.4-2), carnet-tools-cn (>= 3.0.4), gawk | mawk, ${misc:Depends}
Description: A utility for monitoring and managing daemons or similar programs
monit is a utility for monitoring and managing daemons or similar
programs running on a Unix system. It will start specified programs
Copyright:
- Copyright (C) 2009 Dinko Korunic, CARNet, Grupa za izradu paketa
+ Copyright (C) 2013 Dinko Korunic, CARNet, Grupa za izradu paketa
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# import CN-functions
. /usr/share/carnet-tools/functions.sh
-# check if monitrc is an empty template
+# check if monitrc is ours
installfile=1
if [ -e /etc/monit/monitrc ]; then
- lines=$(grep -v '^#' /etc/monit/monitrc | wc -l)
- if [ $lines -lt 4 ]; then
+ if ! grep -q "CARNet package monit-cn" /etc/monit/monitrc; then
installfile=1
mv -f /etc/monit/monitrc /etc/monit/monitrc.dpkg-old
else
's/^set alert \([^[:space:]]*@[^[:space:]]*\) .*$/set alert \1 but not on { instance }/g' \
/etc/monit/monitrc || true
+# migrate from old hierarchy
+if [ -d /etc/monit.d ]; then
+ find /etc/monit.d -type f -print0 | xargs -0r -I% mv % /etc/monit/conf.d || true
+ rmdir /etc/monit.d >/dev/null 2>&1 || true
+fi
+
# (re)generate monit.d files
update-monit.d || true
# disable monit startup
cp_check_and_sed '^startup[[:space:]]*=[[:space:]]*1' \
's/^startup[[:space:]]*=.*/startup=0/g' /etc/default/monit || true
+cp_check_and_sed '^START[[:space:]]*=[[:space:]]*yes' \
+ 's/^START[[:space:]]*=.*/START=no/g' /etc/default/monit || true
# systemv part
if ! grep -q 'CARNet package monit-cn' /etc/init.d/monit; then
fi
fi
+# if old inittab is referencing sbin, fix it
+if grep -q '/usr/sbin/monit' /etc/inittab; then
+ cp_check_and_sed '/usr/sbin/monit' \
+ 's:/usr/sbin/monit:/usr/bin/monit:g' \
+ /etc/inittab || true
+fi
+
# install as inittab service
-if ! grep -q '/usr/sbin/monit' /etc/inittab; then
+if ! grep -q '/usr/bin/monit' /etc/inittab; then
echo "CN: Installing monit service in /etc/inittab"
cp -a /etc/inittab /etc/inittab.$$
cp-update monit-cn /etc/inittab.$$ <<EOF
-mo:2345:respawn:/usr/sbin/monit -Ic /etc/monit/monitrc
-m0:06:wait:/usr/sbin/monit -Ic /etc/monit/monitrc stop myprocess
+mo:2345:respawn:/usr/bin/monit -Ic /etc/monit/monitrc
+m0:06:wait:/usr/bin/monit -Ic /etc/monit/monitrc stop myprocess
EOF
cp_mv /etc/inittab.$$ /etc/inittab
fi
# reload init, since we have new configuration
echo "CN: (Re)starting monit service, please check /var/log/daemon.log"
-pkill -9 -f '/usr/sbin/monit$' || true
+pkill -9 -f '/usr/bin/monit$' || true
telinit q
# dh_installdeb will replace this with shell code automatically
# kill monit
echo "CN: Stopping monit service"
-pkill -9 -f /usr/sbin/monit || true
+pkill -9 -f /usr/bin/monit || true
# reload init
telinit q
-# monit-cn template
+## Begin - Generated by CARNet package monit-cn
+#
+# This is a monit-cn configuration file. It WILL NOT be overwriten if the
+# content has been changed, unless the headers have been removed.
+#
+## End - Generated by CARNet package monit-cn
set daemon 900
set logfile syslog facility log_daemon
#allow localhost
#allow admin:monit
-include /etc/monit.d/*conf
+include /etc/monit/conf.d/*.conf
--- /dev/null
+## Begin - Generated by CARNet package monit-cn
+#
+# This is a monit-cn template file. REMOVE this whole comment block if
+# you DON'T WANT monit-cn to edit/remove/delete your configuration file.
+#
+## End - Generated by CARNet package monit-cn
+
+check process zabbix-agent with pidfile "/var/run/zabbix/zabbix_agentd.pid"
+ start program = "/etc/init.d/zabbix-agent start"
+ stop program = "/etc/init.d/zabbix-agent stop"
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
-MONIT_DIR=/etc/monit.d
+MONIT_DIR=/etc/monit/conf.d
TEMPLATES_DIR=/usr/share/monit-cn
if [ $changed -eq 1 ]; then
echo "CN: Stopping/restarting monit service"
- pkill -9 -f /usr/sbin/monit || true
+ pkill -9 -f /usr/bin/monit || true
else
echo "CN: No new services detected, sorry"
fi