2008-12-30 00:57:07 +01:00
|
|
|
#!/bin/sh
|
2012-03-24 21:12:55 +01:00
|
|
|
# postrm script for shellinabox
|
|
|
|
#
|
|
|
|
# see: dh_installdeb(1)
|
2008-12-30 00:57:07 +01:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2012-03-24 21:12:55 +01:00
|
|
|
# summary of how this script can be called:
|
|
|
|
# * <postrm> `remove'
|
|
|
|
# * <postrm> `purge'
|
|
|
|
# * <old-postrm> `upgrade' <new-version>
|
|
|
|
# * <new-postrm> `failed-upgrade' <old-version>
|
|
|
|
# * <new-postrm> `abort-install'
|
|
|
|
# * <new-postrm> `abort-install' <old-version>
|
|
|
|
# * <new-postrm> `abort-upgrade' <old-version>
|
|
|
|
# * <disappearer's-postrm> `disappear' <overwriter>
|
|
|
|
# <overwriter-version>
|
|
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
|
|
# the debian-policy package
|
|
|
|
|
2012-04-16 03:01:05 +02:00
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
|
|
# generated by other debhelper scripts.
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
d=/var/lib/shellinabox
|
2008-12-30 00:57:07 +01:00
|
|
|
|
2012-03-24 21:12:55 +01:00
|
|
|
case "$1" in
|
|
|
|
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
|
|
;;
|
|
|
|
|
|
|
|
purge)
|
2012-04-16 03:01:05 +02:00
|
|
|
deluser --quiet --system shellinabox > /dev/null || true
|
2008-12-30 00:57:07 +01:00
|
|
|
delgroup --quiet --system shellinabox > /dev/null || true
|
2012-04-16 03:01:05 +02:00
|
|
|
[ ! -d "$d" ] || rmdir "$d" || true # deluser can't do this for /var
|
2012-03-24 21:12:55 +01:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|