diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-01-25 16:40:29 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-01-25 16:40:29 +0100 |
commit | d08fd8351bc9d5bfad5d14cb2a0b67680d8cde9d (patch) | |
tree | 6305fcae929c5e1b0eaea99683c04bc7d028b2ce | |
parent | 88a34731869dc7156f06f5856552c12a0d7d742c (diff) | |
download | Ishtar-d08fd8351bc9d5bfad5d14cb2a0b67680d8cde9d.tar.bz2 Ishtar-d08fd8351bc9d5bfad5d14cb2a0b67680d8cde9d.zip |
Installation: fix installtion script to allow custom DB PORT and DB HOST
-rw-r--r-- | install/config.template | 1 | ||||
-rwxr-xr-x | 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" |