2 # postinst script for shellinabox
6 # summary of how this script can be called:
7 # * <postinst> `configure' <most-recently-configured-version>
8 # * <old-postinst> `abort-upgrade' <new version>
9 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
11 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
12 # <failed-install-package> <version> `removing'
13 # <conflicting-package> <version>
14 # for details, see http://www.debian.org/doc/debian-policy/ or
15 # the debian-policy package
19 if ! getent passwd shellinabox >/dev/null; then
20 adduser --disabled-password --quiet --system \
21 --home /var/lib/shellinabox --gecos "Shell In A Box" \
25 abort-upgrade|abort-remove|abort-deconfigure)
28 echo "postinst called with unknown argument \`$1'" >&2
33 # Automatically added by dh_installinit
34 if [ -x "/etc/init.d/shellinabox" ]; then
35 update-rc.d shellinabox start 30 2 3 4 5 . stop 01 0 1 6 . >/dev/null
36 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
37 invoke-rc.d shellinabox start || exit $?
39 /etc/init.d/shellinabox start || exit $?
42 # End automatically added section