]> andersk Git - test.git/blob - debian/shellinabox.postinst
9863de7695719f1f7d81aff950b85ab5118bfa0d
[test.git] / debian / shellinabox.postinst
1 #!/bin/sh
2 # postinst script for shellinabox
3
4 set -e
5
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>
10 #          <new-version>
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
16
17 case "$1" in
18   configure)
19     if ! getent passwd shellinabox >/dev/null; then
20       adduser --disabled-password  --quiet --system \
21         --home /var/lib/shellinabox --gecos "Shell In A Box" \
22         --group shellinabox
23     fi
24   ;;
25   abort-upgrade|abort-remove|abort-deconfigure)
26   ;;
27   *)
28     echo "postinst called with unknown argument \`$1'" >&2
29     exit 1
30   ;;
31 esac
32
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 $?
38         else
39                 /etc/init.d/shellinabox start || exit $?
40         fi
41 fi
42 # End automatically added section
This page took 1.498843 seconds and 3 git commands to generate.