50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
set -e
 | 
						|
 | 
						|
# Source debconf library.
 | 
						|
. /usr/share/debconf/confmodule
 | 
						|
 | 
						|
CONFIGFILE="/etc/alternc/local.sh"
 | 
						|
LOGROTATE="/etc/logrotate.d/roundcube-core"
 | 
						|
 | 
						|
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
 | 
						|
	fi
 | 
						|
 | 
						|
	# removed from 3.1 & 3.2 :
 | 
						|
	dpkg-statoverride --list /var/lib/roundcube/temp >/dev/null &&  
 | 
						|
	dpkg-statoverride --remove /var/lib/roundcube/temp
 | 
						|
	chown -R www-data:root /var/lib/roundcube/temp
 | 
						|
	chmod -R 750 /var/lib/roundcube/temp
 | 
						|
 | 
						|
	dpkg-statoverride --list /etc/roundcube/debian-db.php >/dev/null && 
 | 
						|
	dpkg-statoverride --remove /etc/roundcube/debian-db.php
 | 
						|
	chown root:www-data /etc/roundcube/debian-db.php
 | 
						|
	chmod 640 /etc/roundcube/debian-db.php
 | 
						|
 | 
						|
	dpkg-statoverride --list /etc/roundcube/main.inc.php >/dev/null && 
 | 
						|
	dpkg-statoverride --remove /etc/roundcube/main.inc.php
 | 
						|
	chown root:www-data /etc/roundcube/main.inc.php
 | 
						|
	chmod 640 /etc/roundcube/main.inc.php
 | 
						|
 | 
						|
	dpkg-statoverride --list /var/log/roundcube >/dev/null && 
 | 
						|
	dpkg-statoverride --remove /var/log/roundcube
 | 
						|
	chown -R www-data:root /var/log/roundcube
 | 
						|
	chmod -R 750 /var/log/roundcube
 | 
						|
 | 
						|
	echo "**********************************************"
 | 
						|
	echo "*          ALTERNC-ROUNDCUBE:                *"
 | 
						|
	echo "* Please run alternc.install to fully deploy *"
 | 
						|
	echo "**********************************************"
 | 
						|
	;;
 | 
						|
esac
 | 
						|
 | 
						|
# dh_installdeb will replace this with shell code automatically
 | 
						|
# generated by other debhelper scripts.
 | 
						|
#DEBHELPER#
 |