diff options
-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" |