- fixing DOVECOT SSL certificate path and manage it in alternc.install.

- fix UPGRADE path from 3.0 to 3.1 using ALTERNC_LOC old variable in /etc/alternc/local.sh
- Pre-depends on ACL instead of Depends, allow the alternc.config acl script check to work
- update_domains was using /usr/bin/alternc_reload, now migrated to /usr/lib/alternc/
This commit is contained in:
Benjamin Sonntag 2013-05-28 04:58:01 +00:00
parent b6991be784
commit f1a84b6e53
6 changed files with 30 additions and 13 deletions

View File

@ -66,7 +66,7 @@ function get_first_existing_dir() {
# Prend en premier parametre un chemin # Prend en premier parametre un chemin
# Retourne le répertoire parent existant le plus "proche" # Retourne le répertoire parent existant le plus "proche"
# Exemple: on lui donne /var/www/alternc/gerard/dupont/ mais # Exemple: on lui donne /var/www/alternc/gerard/dupont/ mais
# seul /var/www/alternc existe, ca répond /var/www/alternc # seul /var/www/alternc existe, ca répond /var/www/alternc
dir="$1" dir="$1"
if [ -z "$dir" ] ; then if [ -z "$dir" ] ; then
return 0 return 0
@ -109,6 +109,12 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do
# source the current config # source the current config
. /etc/alternc/local.sh . /etc/alternc/local.sh
fi fi
# upgrade <= 3.0 to >= 3.1
if [ "x$ALTERNC_LOC" != "x" ]
then
ALTERNC_HTML="$ALTERNC_LOC/html"
ALTERNC_MAIL="$ALTERNC_LOC/mail"
fi
#We ask for the hosting name and the FQDN #We ask for the hosting name and the FQDN
db_set alternc/hostingname "$HOSTING" db_set alternc/hostingname "$HOSTING"

9
debian/changelog vendored
View File

@ -1,9 +1,12 @@
alternc (3.1~alpha1) experimental; urgency=low alternc (3.1~alpha012) experimental; urgency=low
* menu became dynamic with a class * menu became dynamic with a class
* /var/alternc disapear to became Debian-compliant * /var/alternc disapear to became Debian-compliant (but we upgrade properly, keeping an existing /var/alternc)
* fix detection of ACL using pre-depends
* fix dovecot SSL certificate (was pointing to an non-existing file)
* configure dovecot properly when using /etc/alternc/alternc.pem
-- Alan Garcia <fufroma@nnx.com> Mon, 18 Feb 2013 16:09:58 +0100 -- Benjamin Sonntag <benjamin@sonntag.fr> Thu, 28 May 2013 06:09:00 +0100
alternc (3.0) stable; urgency=low alternc (3.0) stable; urgency=low

10
debian/control vendored
View File

@ -9,10 +9,10 @@ Standards-Version: 3.9.4
Package: alternc Package: alternc
Architecture: all Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0, bash (>= 4) Pre-depends: debconf (>= 0.5.00) | debconf-2.0, bash (>= 4), acl
Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, bind9, wget, rsync, 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), sudo, adduser, mysql-client, dnsutils, acl, dovecot-common (>=1:1.2.15), dovecot-common(<< 1:2.0), dovecot-imapd (>= 1:1.2.15), dovecot-pop3d (>= 1:1.2.15), vlogger, mailutils | mailx, incron, cron, ${misc:Depends} Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, bind9, wget, rsync, 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), sudo, adduser, mysql-client, dnsutils, dovecot-common (>=1:1.2.15), dovecot-common(<< 1:2.0), dovecot-imapd (>= 1:1.2.15), dovecot-pop3d (>= 1:1.2.15), vlogger, mailutils | mailx, incron, cron, ${misc:Depends}
Recommends: mysql-server(>= 5.0), ntp, quota Recommends: mysql-server(>= 5.0), ntp, quota
Conflicts: alternc-admintools, alternc-awstats (<< 1.0), alternc-webalizer (<= 0.9.4), alternc-mailman (<< 2.0) Conflicts: alternc-admintools, alternc-awstats (<< 1.0), alternc-webalizer (<= 0.9.4), alternc-mailman (<< 2.0), courier-authlib
Provides: alternc-admintools Provides: alternc-admintools
Replaces: alternc-admintools Replaces: alternc-admintools
Suggests: alternc-awstats, alternc-mailman, alternc-changepass, amavisd-new, clamav-daemon, spamassassin, pop-before-smtp, magpierss, zip, ncompress, bzip2, alternc-squirrelmail, alternc-roundcube Suggests: alternc-awstats, alternc-mailman, alternc-changepass, amavisd-new, clamav-daemon, spamassassin, pop-before-smtp, magpierss, zip, ncompress, bzip2, alternc-squirrelmail, alternc-roundcube
@ -38,8 +38,8 @@ Description-fr.UTF-8: Suite logicielle d'hébergement mutualisé pour Debian
Package: alternc-slave Package: alternc-slave
Architecture: all Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0 Pre-depends: debconf (>= 0.5.00) | debconf-2.0, acl
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, 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, vlogger, mailutils | mailx, incron, cron, ${misc:Depends} 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, 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, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d, vlogger, mailutils | mailx, incron, cron, ${misc:Depends}
Recommends: dovecot-managesieved, dovecot-sieve, dovecot-mysql, quota Recommends: dovecot-managesieved, dovecot-sieve, dovecot-mysql, quota
Conflicts: alternc-admintools, alternc-awstats (<= 0.3.2), alternc-webalizer (<= 0.9.4), alternc Conflicts: alternc-admintools, alternc-awstats (<= 0.3.2), alternc-webalizer (<= 0.9.4), alternc
Provides: alternc Provides: alternc

View File

@ -101,9 +101,9 @@ ssl = required
# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
# dropping root privileges, so keep the key file unreadable by anyone but # dropping root privileges, so keep the key file unreadable by anyone but
# root. # root.
ssl_cert_file = /etc/ssl/certs/dovecot.pem ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
#ssl_cert_file = /etc/alternc/apache.pem #ssl_cert_file = /etc/alternc/apache.pem
ssl_key_file = /etc/ssl/private/dovecot.pem ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
#ssl_key_file = /etc/alternc/apache.pem #ssl_key_file = /etc/alternc/apache.pem
# If key file is password protected, give the password here. Alternatively # If key file is password protected, give the password here. Alternatively

View File

@ -304,11 +304,19 @@ if [ -x /usr/sbin/apache2 ]; then
ln -sf /etc/alternc/apache2-ssl.conf /etc/apache2/conf.d/alternc-ssl.conf ln -sf /etc/alternc/apache2-ssl.conf /etc/apache2/conf.d/alternc-ssl.conf
s="apache2" s="apache2"
fi fi
# We enable dovecot SSL certificate instructions: (on wheezy we should use a new file in /etc/dovecot/conf.d/ )
sed -i -e 's#/etc/ssl/certs/ssl-cert-snakeoil.pem#/etc/alternc/apache.pem#' -e 's#/etc/ssl/private/ssl-cert-snakeoil.key# /etc/alternc/apache.pem#' /etc/dovecot/dovecot.conf
else else
# We disable proftpd tls module # We disable proftpd tls module
cat /etc/proftpd/modules.conf | sed -e 's/^LoadModule mod_tls.c/#LoadModule mod_tls.c/' > /etc/proftpd/modules.conf.alternc-new cat /etc/proftpd/modules.conf | sed -e 's/^LoadModule mod_tls.c/#LoadModule mod_tls.c/' > /etc/proftpd/modules.conf.alternc-new
mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf
cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/ cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/
# We disable dovecot SSL certificate instructions: (on wheezy we should remove a file in /etc/dovecot/conf.d/ )
sed -i -e 's#^ssl_cert_file.*$#ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem#' -e 's#^ssl_key_file.*$#ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key#' /etc/dovecot/dovecot.conf
echo "SSL not configured" echo "SSL not configured"
echo "create a certificate in /etc/alternc/apache.pem and rerun alternc.install" echo "create a certificate in /etc/alternc/apache.pem and rerun alternc.install"
fi fi

View File

@ -143,9 +143,9 @@ if [ ! -z "$(cat "$RELOAD_WEB")" ] ; then
fi fi
mv "$tempo" "$VHOST_FILE" mv "$tempo" "$VHOST_FILE"
# We must reload apache # We must reload apache
# we assume we run apache on the master # we assume we run apache on the master
/usr/bin/alternc_reload apache || true /usr/lib/alternc/alternc_reload apache || true
# Launch hooks for apache reload # Launch hooks for apache reload
run-parts --arg=web_reload /usr/lib/alternc/reload.d run-parts --arg=web_reload /usr/lib/alternc/reload.d
fi fi