#!/bin/sh # postinst script for mysecureshell # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # Validating Shell add-shell /usr/bin/mysecureshell # Reassign rights cd /usr/bin chmod 755 sftp-who sftp-verif sftp-user chmod 700 sftp-state sftp-kill sftp-admin # If sticky bit exist, do not override it test -u mysecureshell || chmod 755 mysecureshell # Automatically added by dh_installinit/13.14.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/mysecureshell" ]; then update-rc.d mysecureshell defaults >/dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d mysecureshell $_dh_action || exit 1 fi fi # End automatically added section exit 0