File: //var/lib/dpkg/info/ctrlsh-unix.postinst
#!/bin/sh
# vim: ts=4 sts=4 sw=4 et ai
# postinst script for ctrlsh-core
#
# see: dh_installdeb(1)
# 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>
# * <postinst> `abort-remove'
# * <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
set -e
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
chown ctrlsh:ctrlsh \
/opt/ctrlsh/.ssh \
/opt/ctrlsh/.ssh/authorized_keys \
if [ ! -e /opt/ctrlsh/etc/headers ]; then
mkdir /opt/ctrlsh/etc/headers
fi
for hfile in group gshadow passwd shadow sudoers; do
touch "/opt/ctrlsh/etc/headers/${hfile}"
done
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0