alternc-roundcube.postinst 1.66 KB
Newer Older
1
#!/bin/bash
2 3 4 5 6 7 8

set -e

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

CONFIGFILE="/etc/alternc/local.sh"
9
LOGROTATE="/etc/logrotate.d/roundcube-core"
10 11 12 13 14 15 16

case "$1" in
    configure)
	
        # add alternc-roundcube user for php-itk special rights
	if ! getent passwd alternc-roundcube; then
	    useradd -g nogroup -u 1996 alternc-roundcube -d /usr/share/roundcube
17 18
	fi
	     
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
	dpkg-statoverride --list /var/lib/roundcube/temp >/dev/null || 
	dpkg-statoverride --add alternc-roundcube root 0750 /var/lib/roundcube/temp
	chown -R alternc-roundcube:root /var/lib/roundcube/temp
	chmod -R 750 /var/lib/roundcube/temp

	dpkg-statoverride --list /etc/roundcube/debian-db.php >/dev/null || 
	dpkg-statoverride --add alternc-roundcube root 0460 /etc/roundcube/debian-db.php
	chown -R alternc-roundcube:root /etc/roundcube/debian-db.php
	chmod -R 460 /etc/roundcube/debian-db.php

	dpkg-statoverride --list /etc/roundcube/main.inc.php >/dev/null || 
	dpkg-statoverride --add alternc-roundcube root 0460 /etc/roundcube/main.inc.php
	chown -R alternc-roundcube:root /etc/roundcube/main.inc.php
	chmod -R 460 /etc/roundcube/main.inc.php

34 35
	dpkg-statoverride --list /var/log/roundcube >/dev/null ||
	dpkg-statoverride --add alternc-roundcube root 0750 /var/log/roundcube
36
	chown -R alternc-roundcube:root /var/log/roundcube
37 38
	chmod -R 750 /var/log/roundcube

39 40 41 42 43 44 45
	echo "**********************************************"
	echo "*          ALTERNC-ROUNDCUBE:                *"
	echo "* Please run alternc.install to fully deploy *"
	echo "**********************************************"
	;;
esac

46 47 48
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#