fix account creation and setting of account_repository in setup on a Univention system

This commit is contained in:
Ralf Becker 2017-11-17 10:35:56 +01:00
parent d9a35bb884
commit 0d7dd5b2fd
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,4 @@
/var/lib/egroupware/header.inc.php
/etc/egroupware/apache.conf
/etc/egroupware/apache-univention.conf
/etc/egroupware/nginx.conf

View File

@ -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

View File

@ -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