From 5df2cb4e989d9faa05d9d9a6bc3f00955c0d7c9f Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sun, 26 Aug 2012 18:24:26 +0000 Subject: [PATCH] adding postinst for squirrelmail + user alternc-squirrelmail + statoverride for /var/lib/squirrelmail and /var/spool/squirrelmail --- .gitattributes | 1 + debian/alternc-squirrelmail.postinst | 22 +++++++++++++++++++ debian/alternc.postinst | 3 --- debian/control | 6 ++--- squirrelmail/apache-panel.d/squirrelmail.conf | 4 ++-- squirrelmail/squirrelmail-install | 4 +--- 6 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 debian/alternc-squirrelmail.postinst diff --git a/.gitattributes b/.gitattributes index bd05e298..1eaaa46c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -383,6 +383,7 @@ debian/alternc-slave.postrm -text debian/alternc-slave.prerm -text debian/alternc-slave.templates -text debian/alternc-squirrelmail.dirs -text +debian/alternc-squirrelmail.postinst -text debian/alternc.config -text debian/alternc.cron.d -text debian/alternc.dirs -text diff --git a/debian/alternc-squirrelmail.postinst b/debian/alternc-squirrelmail.postinst new file mode 100644 index 00000000..9c9ebfcd --- /dev/null +++ b/debian/alternc-squirrelmail.postinst @@ -0,0 +1,22 @@ +#!/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 + useradd -g alternc-squirrelmail -u 1997 alternc-squirrelmail -d /usr/share/squirrelmail -m + fi + dpkg-statoverride --add alternc-squirrelmail root 0750 /var/spool/squirrelmail/attach /usr/lib/squirrelmail/data + chown -R alternc-squirrelmail:root /var/spool/squirrelmail/attach /usr/lib/squirrelmail/data + chmod -R 750 /var/spool/squirrelmail/attach /usr/lib/squirrelmail/data + ;; +esac + diff --git a/debian/alternc.postinst b/debian/alternc.postinst index b03ea87f..9b4d2541 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -240,9 +240,6 @@ EOF # Apache will not start without this file touch /var/alternc/apache-vhost/vhosts_all.conf - #squirrelmail fix - chown -R :alterncpanel /var/lib/squirrelmail/data - chmod -R g+w /var/lib/squirrelmail #sudo stuff allowing alterncpanel to use quota if [ -d /etc/sudoers.d ]; then cp /etc/alternc/alternc-sudoers /etc/sudoers.d/alternc-sudoers diff --git a/debian/control b/debian/control index 8fc6896f..61994915 100644 --- a/debian/control +++ b/debian/control @@ -39,7 +39,7 @@ Description-fr.UTF-8: Suite logicielle d'hébergement mutualisé pour Debian Package: alternc-slave Architecture: all Pre-depends: debconf (>= 0.5.00) | debconf-2.0 -Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, squirrelmail, postfix-tls, bind9, wget, rsync, quota, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), adduser, mysql-client, sudo, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d +Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, postfix-tls, bind9, wget, rsync, quota, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), adduser, mysql-client, sudo, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d Recommends: dovecot-managesieved, dovecot-sieve, dovecot-mysql Conflicts: alternc-admintools, alternc-awstats (<= 0.3.2), alternc-webalizer (<= 0.9.4), alternc, courier-authdaemon Provides: alternc @@ -74,8 +74,8 @@ Description-fr.UTF-8: Suite logicielle d'hébergement mutualisé pour Debian Package: alternc-squirrelmail Architecture: all -Pre-depends: debconf (>= 0.5.00) | debconf-2.0 -Depends: debianutils (>= 1.13.1), alternc (>= 1.1), squirrelmail, squirrelmail-locales, avelsieve +Pre-depends: debconf (>= 0.5.00) | debconf-2.0, alternc (>= 1.1) +Depends: debianutils (>= 1.13.1), squirrelmail, squirrelmail-locales, avelsieve Conflicts: alternc (<= 1.0.3) Provides: alternc-webmail Suggests: diff --git a/squirrelmail/apache-panel.d/squirrelmail.conf b/squirrelmail/apache-panel.d/squirrelmail.conf index 39d4b4c1..01c58388 100644 --- a/squirrelmail/apache-panel.d/squirrelmail.conf +++ b/squirrelmail/apache-panel.d/squirrelmail.conf @@ -1,4 +1,4 @@ -Alias /squirrelmail /usr/share/squirrelmail -Alias /javascript /usr/share/javascript-common +Alias /squirrel /usr/share/squirrelmail +Alias /javascript /usr/share/javascript diff --git a/squirrelmail/squirrelmail-install b/squirrelmail/squirrelmail-install index fb8e7456..ee594e15 100644 --- a/squirrelmail/squirrelmail-install +++ b/squirrelmail/squirrelmail-install @@ -32,10 +32,8 @@ then . /usr/lib/alternc/functions.sh echo "Setting squirrelmail as default webmail" - mysql_query "REPLACE INTO variable SET name='webmail_redirect', value='squirrelmail', comment='Set it to the name of your preferred webmail, /webmail will point to it';" + mysql_query "INSERT IGNORE INTO variable SET name='webmail_redirect', value='squirrel', comment='Set it to the name of your preferred webmail, /webmail will point to it (squirrel, rc...)';" echo "Done" fi - -