;;
esac
-# import CN-functions
-. /usr/share/carnet-tools/functions.sh
+# Brisemo /etc/monit, ali samo ako paket MONIT nije vise instaliran
-# remove us from inittab
-echo "CN: Removing monit service from /etc/inittab"
-cp-update -r monit-cn /etc/inittab
-
-# kill monit
-echo "CN: Stopping monit service"
-pkill -9 -f /usr/sbin/monit
-
-# reload init
-kill -HUP 1
+if [ $(dpkg-query -W -f='${Status}' monit 2> /dev/null | grep -c "ok installed" || true) -ne "0" ]; then
+ rm -fr /etc/monit
+fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.