Skip to content

Commit

Permalink
add warnings if WIS2BOX_WEBAPP credentials not set
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Apr 29, 2024
1 parent a360073 commit f9968b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wis2box-management/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9968b4

Please sign in to comment.