alternc-squirrelmail.postinst 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

CONFIGFILE="/etc/alternc/local.sh"

case "$1" in
    configure)
	
        # add alternc-squirrelmail user for php-itk special rights
	if ! getent passwd alternc-squirrelmail; then
15
	    useradd -g nogroup -u 1997 alternc-squirrelmail -d /usr/share/squirrelmail 
16
	fi 	     
17
	dpkg-statoverride --list /var/spool/squirrelmail/attach >/dev/null || 
18
	dpkg-statoverride --add alternc-squirrelmail root 0750 /var/spool/squirrelmail/attach
19 20 21 22
	dpkg-statoverride --list /var/lib/squirrelmail/data >/dev/null || 
	dpkg-statoverride --add alternc-squirrelmail root 0750 /var/lib/squirrelmail/data
	chown -R alternc-squirrelmail:root /var/spool/squirrelmail/attach /var/lib/squirrelmail/data
	chmod -R 750 /var/spool/squirrelmail/attach /var/lib/squirrelmail/data	
23
	# Enable the squirrelmail plugin 
24 25 26 27 28 29
	squirrelmail-configure --remove-plugin alternc_changepass
        squirrelmail-configure --install-plugin alternc_changepass
	echo "**********************************************"
	echo "*        ALTERNC-SQUIRRELMAIL:               *"
	echo "* Please run alternc.install to fully deploy *"
	echo "**********************************************"
30 31 32
	;;
esac

33 34 35
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#