Package: monit-cn
Architecture: all
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
+Description: 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
if they are not running and restart programs not responding.
service monit restart
-## systemv part
-#if ! grep -q 'CARNet package monit-cn' /etc/init.d/monit; then
-# echo "CN: Disabling monit SystemV script"
-# if [ -x "/etc/init.d/monit" ]; then
-# update-rc.d -f monit remove >/dev/null 2>&1
-# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-# invoke-rc.d monit stop || true
-# else
-# /etc/init.d/monit stop || true
-# fi
-# fi
-# if [ -e "/etc/init.d/monit" ]; then
-# # shebang
-# head -n1 /etc/init.d/monit > /etc/init.d/monit.$$
-# # middle part
-# cp-update monit-cn /etc/init.d/monit.$$ <<EOF
-#echo "CN: Monit SystemV init script disabled -- inittab is in use"
-#echo "CN: Exiting now..."
-#exit 0
-#EOF
-# # rest of init script
-# tail -n+2 /etc/init.d/monit >> /etc/init.d/monit.$$
-# mv -f /etc/init.d/monit.$$ /etc/init.d/monit
-# chmod +x /etc/init.d/monit
-# 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/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/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/bin/monit$' || true
-#telinit q
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
#DEBHELPER#
exit 0
+++ /dev/null
-#!/bin/sh
-# postrm script for monit-cn
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-case "$1" in
- purge)
- # continue below
- ;;
-
- *)
- exit 0
- ;;
-esac
-
-## import CN-functions
-#. /usr/share/carnet-tools/functions.sh
-#
-## remove us from inittab
-#echo "CN: Removing monit service from /etc/inittab"
-#cp-update -r monit-cn /etc/inittab
-#
-## remove us from systemv monit script
-#echo "CN: Removing monit workaround from /etc/init.d/monit"
-#cp-update -r monit-cn /etc/init.d/monit
-#chmod +x /etc/init.d/monit
-#
-## kill monit
-#echo "CN: Stopping monit service"
-#pkill -9 -f /usr/bin/monit || true
-#
-## reload init
-#telinit q
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0