diff options
Diffstat (limited to 'debian/postrm')
-rw-r--r-- | debian/postrm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..236c646 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,31 @@ +#! /bin/sh +# postrm script for samhain +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + purge) + for dir in /var/log/samhain/supervise /var/log/samhain /var/lib/samhain /var/run/samhain /var/state/samhain + do + [ -d "$dir" ] && { + find $dir -type f -exec rm -f {} \; + rmdir $dir + } + done + + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) +# Do nothing + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# |