From a409b8b473027ab19053a1704cb0546b899df454 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Nov 2017 10:35:56 +0100 Subject: [PATCH] fix account creation and setting of account_repository in setup on a Univention system --- doc/rpm-build/debian.egroupware-epl-core.conffiles | 1 + doc/rpm-build/debian.postinst | 10 ++++++++-- doc/rpm-build/debian.rules | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/rpm-build/debian.egroupware-epl-core.conffiles b/doc/rpm-build/debian.egroupware-epl-core.conffiles index c022e8f0ef..3338cb546c 100644 --- a/doc/rpm-build/debian.egroupware-epl-core.conffiles +++ b/doc/rpm-build/debian.egroupware-epl-core.conffiles @@ -1,3 +1,4 @@ /var/lib/egroupware/header.inc.php /etc/egroupware/apache.conf +/etc/egroupware/apache-univention.conf /etc/egroupware/nginx.conf diff --git a/doc/rpm-build/debian.postinst b/doc/rpm-build/debian.postinst index 9012a3263f..f11d5face7 100644 --- a/doc/rpm-build/debian.postinst +++ b/doc/rpm-build/debian.postinst @@ -34,9 +34,11 @@ then # fix ownership of files created during update chown -R www-data /var/lib/egroupware else + apache_conf=apache.conf # Debian 9 has no more /etc/lsb-release and gives an error if test -f /etc/lsb-release && grep -q '^DISTRIB_ID="*Univention"*$' /etc/lsb-release then + apache_conf=apache-univention.conf if [ -n "$DOCKER_HOST_NAME" -a -n "$DB_HOST" ] then # docker UCS setup, use appcenter join script @@ -109,11 +111,15 @@ then fi nginx -s reload else + # use either apache.conf or apache-univention.conf for extra open_basedir + apache_conf=apache.conf + test -f /etc/lsb-release && grep -q '^DISTRIB_ID="*Univention"*$' && apache_conf=apache-univention.conf + if [ -d /etc/apache2/conf.d ] ; then - ln -fs ../../egroupware/apache.conf /etc/apache2/conf.d/egroupware + ln -fs ../../egroupware/$apache_conf /etc/apache2/conf.d/egroupware else if [ -d /etc/apache2/sites-available ] ; then - ln -fs ../../egroupware/apache.conf /etc/apache2/sites-available/egroupware.conf + ln -fs ../../egroupware/$apache_conf /etc/apache2/sites-available/egroupware.conf a2ensite egroupware fi fi diff --git a/doc/rpm-build/debian.rules b/doc/rpm-build/debian.rules index 3c249fa9c9..1ad7467d87 100644 --- a/doc/rpm-build/debian.rules +++ b/doc/rpm-build/debian.rules @@ -42,6 +42,9 @@ install: build # customize webserver config mkdir -p $(CURDIR)/debian/egroupware-epl-core/etc/egroupware cp $(CURDIR)/doc/rpm-build/apache.conf $(CURDIR)/debian/egroupware-epl-core/etc/egroupware/apache.conf + # Univention needs access to /usr/sbin/univention-directory-manager symlinked to /usr/share/univention-directory-manager-tools/directory-manager-cli + sed 's|\(open_basedir .*\)$|\1:/usr/sbin/univention-directory-manager:/usr/share/univention-directory-manager-tools/directory-manager-cli|' \ + $(CURDIR)/doc/rpm-build/apache.conf > $(CURDIR)/debian/egroupware-epl-core/etc/egroupware/apache-univention.conf cp $(CURDIR)/doc/rpm-build/nginx.conf $(CURDIR)/debian/egroupware-epl-core/etc/egroupware/nginx.conf # install core modules