#! /bin/sh # postrm script for snort # # see: dh_installdeb(1) set -e test $DEBIAN_SCRIPT_DEBUG && set -v -x case "$1" in purge) # old versions of the snort-common package created the database # configuration file on installation. # If it is still there and is empty, it can be safely removed. # If not empty, then the file has information that was introduced # by the configuration of the (deprecated) snort database 'flavor' # packages (previous to 2.9.3) which should have purged the file. # So we leave it there to prevent interfering with local changes. # should deal with it themselves when purge if [ -e /etc/snort/database.conf ] && [ ! -s /etc/snort/database.conf ] then rm -f /etc/snort/database.conf fi ;; esac # if installation was aborted then revert the rename of the cron job using dpkg-maintscript-helper if dpkg-maintscript-helper supports mv_conffile; then dpkg-maintscript-helper mv_conffile \ /etc/cron.daily/5snort /etc/cron.daily/snort-common 2.9.15.1-5~ snort-common -- "$@" dpkg-maintscript-helper mv_conffile \ /etc/cron.daily/snort-common /etc/cron.daily/0snort-common 2.9.15.1-6~ snort-common -- "$@" fi # Restore the old configuration file if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile /etc/snort/database.conf 2.9.3~ snort-common -- "$@" fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installdebconf/13.5.1 if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi # End automatically added section