aab20f5ed0
first release of ShellInABox that supports an AJAX interface instead of the original Java applet. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@2 0da03de8-d603-11dd-86c2-0f8696b7b6f9
42 lines
1.3 KiB
Bash
Executable file
42 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
# postinst script for shellinabox
|
|
|
|
set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
# the debian-policy package
|
|
|
|
case "$1" in
|
|
configure)
|
|
if ! getent passwd shellinabox >/dev/null; then
|
|
adduser --disabled-password --quiet --system \
|
|
--home /var/lib/shellinabox --gecos "Shell In A Box" \
|
|
--group shellinabox
|
|
fi
|
|
;;
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Automatically added by dh_installinit
|
|
if [ -x "/etc/init.d/shellinabox" ]; then
|
|
update-rc.d shellinabox start 30 2 3 4 5 . stop 01 0 1 6 . >/dev/null
|
|
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|
|
invoke-rc.d shellinabox start || exit $?
|
|
else
|
|
/etc/init.d/shellinabox start || exit $?
|
|
fi
|
|
fi
|
|
# End automatically added section
|