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 e53af4078c
commit a409b8b473
3 changed files with 12 additions and 2 deletions

View File

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

View File

@ -34,9 +34,11 @@ then
# fix ownership of files created during update # fix ownership of files created during update
chown -R www-data /var/lib/egroupware chown -R www-data /var/lib/egroupware
else else
apache_conf=apache.conf
# Debian 9 has no more /etc/lsb-release and gives an error # 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 if test -f /etc/lsb-release && grep -q '^DISTRIB_ID="*Univention"*$' /etc/lsb-release
then then
apache_conf=apache-univention.conf
if [ -n "$DOCKER_HOST_NAME" -a -n "$DB_HOST" ] if [ -n "$DOCKER_HOST_NAME" -a -n "$DB_HOST" ]
then then
# docker UCS setup, use appcenter join script # docker UCS setup, use appcenter join script
@ -109,11 +111,15 @@ then
fi fi
nginx -s reload nginx -s reload
else 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 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 else
if [ -d /etc/apache2/sites-available ] ; then 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 a2ensite egroupware
fi fi
fi fi

View File

@ -42,6 +42,9 @@ install: build
# customize webserver config # customize webserver config
mkdir -p $(CURDIR)/debian/egroupware-epl-core/etc/egroupware 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 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 cp $(CURDIR)/doc/rpm-build/nginx.conf $(CURDIR)/debian/egroupware-epl-core/etc/egroupware/nginx.conf
# install core modules # install core modules