X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostrm;h=961ffe72aad02326dca119ed26fd22e776c63d64;hb=d9a6ac164d82f634d18097e23a0d1fda49104d05;hp=eb38a6550a142c2e3e66d476e8882bba7c5d3bab;hpb=c8e1f9a3251c3c43dd63e058de7924542c4d0d25;p=monit-cn.git diff --git a/debian/postrm b/debian/postrm index eb38a65..961ffe7 100755 --- a/debian/postrm +++ b/debian/postrm @@ -27,19 +27,11 @@ case "$1" in ;; 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.