From f9968b437aed39c4578be53dfb88a12fb4b24dca Mon Sep 17 00:00:00 2001 From: Maaike Date: Mon, 29 Apr 2024 14:50:46 +0200 Subject: [PATCH] add warnings if WIS2BOX_WEBAPP credentials not set --- wis2box-management/docker/entrypoint.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wis2box-management/docker/entrypoint.sh b/wis2box-management/docker/entrypoint.sh index d1708ccc5..0a3b41bb5 100755 --- a/wis2box-management/docker/entrypoint.sh +++ b/wis2box-management/docker/entrypoint.sh @@ -45,6 +45,16 @@ wis2box api setup wis2box metadata discovery setup wis2box metadata station setup +# check if WIS2BOX_WEBAPP_USERNAME and WIS2BOX_WEBAPP_PASSWORD are set, otherwise set them +if [ -z "$WIS2BOX_WEBAPP_USERNAME" ]; then + echo "WARNING: WIS2BOX_WEBAPP_USERNAME is not set in wis2box.env, using WIS2BOX_WEBAPP_USERNAME=wis2box-user" + export WIS2BOX_WEBAPP_USERNAME=wis2box-user +fi +if [ -z "$WIS2BOX_WEBAPP_PASSWORD" ]; then + echo "WARNING: WIS2BOX_WEBAPP_PASSWORD is not set in wis2box.env, using WIS2BOX_STORAGE_PASSWORD" + export WIS2BOX_WEBAPP_PASSWORD=${WIS2BOX_STORAGE_PASSWORD} +fi + # create /home/wis2box/.htpasswd/webapp if not exists # otherwise, delete the file and create it if [ ! -f /home/wis2box/.htpasswd/webapp ]; then