From 414095b5f85dc243ae361f66ae8e278698d9806c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Oct 2018 10:46:42 +0200 Subject: [PATCH] change debian.postinst to NOT run post_install.php, if $DOCKER_HOST_NAME and $DB_HOST is non-empty like we already did that for Univention Docker installation --- doc/rpm-build/debian.postinst | 78 ++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/doc/rpm-build/debian.postinst b/doc/rpm-build/debian.postinst index d3777f4833..c7ec3d3045 100644 --- a/doc/rpm-build/debian.postinst +++ b/doc/rpm-build/debian.postinst @@ -40,54 +40,58 @@ then 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" ] + fi + + if [ -n "$DOCKER_HOST_NAME" -a -n "$DB_HOST" ] + then + # docker UCS setup, use appcenter join script + : + else + if test -f /etc/lsb-release && grep -q '^DISTRIB_ID="*Univention"*$' /etc/lsb-release then - # docker UCS setup, use appcenter join script - : - else # normal UCS setup /usr/share/egroupware/doc/rpm-build/post_install.php \ --distro univention \ --admin_user "Administrator" \ --admin_passwd "*unchanged*" 2>&1 | /usr/bin/tee -a $install_log - fi - else - # for non-interactive install let post_install generate passwords - if [ "$DEBIAN_FRONTEND" = "noninteractive" ] - then - /usr/share/egroupware/doc/rpm-build/post_install.php 2>&1 | /usr/bin/tee -a $install_log else - # Get configuration passwords - db_get "egroupware/header/user" - header_user="$RET" - db_get "egroupware/header/password" - header_password="$RET" + # for non-interactive install let post_install generate passwords + if [ "$DEBIAN_FRONTEND" = "noninteractive" ] + then + /usr/share/egroupware/doc/rpm-build/post_install.php 2>&1 | /usr/bin/tee -a $install_log + else + # Get configuration passwords + db_get "egroupware/header/user" + header_user="$RET" + db_get "egroupware/header/password" + header_password="$RET" - # Get first egroupware user / pw - db_get "egroupware/admin/user" - admin_user="$RET" - db_get "egroupware/admin/password" - admin_password="$RET" + # Get first egroupware user / pw + db_get "egroupware/admin/user" + admin_user="$RET" + db_get "egroupware/admin/password" + admin_password="$RET" - # Get egroupware language - db_get "egroupware/lang" - lang="$RET" + # Get egroupware language + db_get "egroupware/lang" + lang="$RET" - # Get mysql root / pw - db_get "egroupware/db_root" - db_root="$RET" - db_get "egroupware/db_root_pw" - db_root_pw="$RET" + # Get mysql root / pw + db_get "egroupware/db_root" + db_root="$RET" + db_get "egroupware/db_root_pw" + db_root_pw="$RET" - /usr/share/egroupware/doc/rpm-build/post_install.php \ - --config_user "$header_user" \ - --config_passwd "$header_password" \ - --admin_user "$admin_user" \ - --admin_passwd "$admin_password" \ - --lang "$lang" \ - --db_type mysql \ - --db_root "$db_root" \ - --db_root_pw "$db_root_pw" 2>&1 | /usr/bin/tee -a $install_log + /usr/share/egroupware/doc/rpm-build/post_install.php \ + --config_user "$header_user" \ + --config_passwd "$header_password" \ + --admin_user "$admin_user" \ + --admin_passwd "$admin_password" \ + --lang "$lang" \ + --db_type mysql \ + --db_root "$db_root" \ + --db_root_pw "$db_root_pw" 2>&1 | /usr/bin/tee -a $install_log + fi fi fi fi