2 # postrm script for bind9-cn
4 # see: dh_installdeb(1)
8 # summary of how this script can be called:
11 # * <old-postrm> `upgrade' <new-version>
12 # * <new-postrm> `failed-upgrade' <old-version>
13 # * <new-postrm> `abort-install'
14 # * <new-postrm> `abort-install' <old-version>
15 # * <new-postrm> `abort-upgrade' <old-version>
16 # * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
17 # for details, see http://www.debian.org/doc/debian-policy/ or
18 # the debian-policy package
31 . /usr/share/carnet-tools/functions.sh
33 # get installation directory
34 if [ -e /etc/ossec-init.conf ]; then
35 . /etc/ossec-init.conf
37 if [ "X${DIRECTORY}" = "X" ]; then
38 DIRECTORY="/var/ossec"
42 local_rules="$DIRECTORY/rules/local_rules.xml"
43 if [ -e "$local_rules" ]; then
44 cp-update --comment '<!--' --comment-end '-->' \
45 -r ossec-hids-cn "$local_rules"
48 # and start the service
49 service ossec-hids restart || true
51 # dh_installdeb will replace this with shell code automatically
52 # generated by other debhelper scripts.