From 7ee6c294030034c7abca27954d4105877224f154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 2 Apr 2013 20:34:02 +0000 Subject: [PATCH] make slaves work again: add missing depends, detect version properly and add missing group --- debian/alternc-slave.postinst | 9 +++++++++ debian/control | 2 +- install/alternc.install | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/alternc-slave.postinst b/debian/alternc-slave.postinst index ac68c89a..8cc5299c 100644 --- a/debian/alternc-slave.postinst +++ b/debian/alternc-slave.postinst @@ -40,6 +40,15 @@ update_var() { case "$1" in configure) + # Create AlternC Panel user for web server + if ! getent group alterncpanel; then + addgroup --system --gid 1999 alterncpanel + fi + if ! getent passwd alterncpanel; then + adduser --system --home "/etc/alternc/.alterncpanel" \ + --disabled-password --uid 1999 --ingroup alterncpanel alterncpanel + fi + # ajoute l'user postfix au groupe sasl adduser --quiet postfix sasl diff --git a/debian/control b/debian/control index 1f135813..3300f6d5 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, 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, ${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, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d, vlogger, mailx, incron, cron, ${misc:depends} Recommends: dovecot-managesieved, dovecot-sieve, dovecot-mysql, quota Conflicts: alternc-admintools, alternc-awstats (<= 0.3.2), alternc-webalizer (<= 0.9.4), alternc Provides: alternc diff --git a/install/alternc.install b/install/alternc.install index ddf3adb8..c9e4bf1c 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -172,7 +172,11 @@ fi WARNING="WARNING: Do not edit this file, edit the one in /etc/alternc/templates and launch alternc.install again." -VERSION="`dpkg -s alternc | sed -n -e 's/^Version: \(.*\)/\1/p'`" +if [ "$slave" = "1" ]; then + VERSION="`dpkg -s alternc-slave | sed -n -e 's/^Version: \(.*\)/\1/p'`" +else + VERSION="`dpkg -s alternc | sed -n -e 's/^Version: \(.*\)/\1/p'`" +fi # /var/ alternc/dns/d/www.example.com FQDN_LETTER="`echo $FQDN | sed -e 's/.*\.\([^\.]\)[^\.]*\.[^\.]*$/\1/'`"