From 5cc16317cf68dee1a89e96ffb63965128e4f2baa Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 25 Jan 2023 16:40:29 +0100 Subject: Installation: fix installtion script to allow custom DB PORT and DB HOST --- install/config.template | 1 - install/ishtar-prepare-instance | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/install/config.template b/install/config.template index ac62dcd4b..8f4dd2519 100644 --- a/install/config.template +++ b/install/config.template @@ -1,5 +1,4 @@ ISHTAR_PATH=/srv/ishtar/ -ISHTAR_DB=127.0.0.1 ISHTAR_WEBSERVER=nginx ISHTAR_LOCALE=fr_FR USE_CELERY=no diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index bafc6133d..50810da76 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -199,8 +199,19 @@ EOF chown -R www-data:www-data "$INSTANCE/static/CACHE" # Preparing DB: - DB_HOST=${ISHTAR_DB-127.0.0.1} - DB_PORT=${ISHTAR_DB_PORT-5432} + + if [ -z "$ISHTAR_DB" ] + then + DB_HOST="127.0.0.1" + else + DB_HOST=${ISHTAR_DB} + fi + if [ "$ISHTAR_DB_PORT" = "-" ] + then + DB_PORT="" + else + DB_PORT=${ISHTAR_DB_PORT-5432} + fi DB_PASSWORD=${DB_PASSWORD-''} DB_NAME="ishtar-$INSTANCE" -- cgit v1.2.3