projects
/
monit-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[monit-cn.git]
/
debian
/
postrm
diff --git
a/debian/postrm
b/debian/postrm
index
61eaa07
..
cbf0f4c
100755
(executable)
--- a/
debian/postrm
+++ b/
debian/postrm
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# postrm script for monit-cn
+# postrm script for bind9-cn
#
# see: dh_installdeb(1)
#
# see: dh_installdeb(1)
@@
-22,29
+22,23
@@
case "$1" in
# continue below
;;
# continue below
;;
- *)
+ remove)
+ # kludge
+ rm -f /usr/share/monit-cn/bacula-fd.conf.cn-old
exit 0
;;
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
+ *)
+ exit 0
+ ;;
+esac
-# kill monit
-echo "CN: Stopping monit service"
-pkill -9 -f /usr/sbin/monit || true
+# Brisemo /etc/monit i /usr/share/monit-cn, ali samo ako paket MONIT nije vise instaliran
-# reload init
-kill -SIGHUP 1
+if [ $(dpkg-query -W -f='${Status}' monit 2> /dev/null | grep -c "ok installed" || true) -ne "0" ]; then
+ echo "Brisem /etc/monit i /usr/share/monit-cn..."
+ rm -fr /etc/monit /usr/share/monit-cn
+fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.