Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not destroy webapp users on startup #792

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions wis2box-management/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,14 @@ if [ ! -d /home/wis2box/.htpasswd/ ]; then
fi

# create /home/wis2box/.htpasswd/webapp if not exists
# otherwise, delete the file and create it
# otherwise, re-create webapp user credentials from the environment
# in case of failure continue
if [ ! -f /home/wis2box/.htpasswd/webapp ]; then
echo "Creating /home/wis2box/.htpasswd/webapp"
htpasswd -bc /home/wis2box/.htpasswd/webapp $WIS2BOX_WEBAPP_USERNAME $WIS2BOX_WEBAPP_PASSWORD || true
else
rm /home/wis2box/.htpasswd/webapp
echo "Re-creating /home/wis2box/.htpasswd/webapp"
htpasswd -bc /home/wis2box/.htpasswd/webapp $WIS2BOX_WEBAPP_USERNAME $WIS2BOX_WEBAPP_PASSWORD || true
echo "Re-creating webapp user credentials in /home/wis2box/.htpasswd/webapp"
htpasswd -b /home/wis2box/.htpasswd/webapp $WIS2BOX_WEBAPP_USERNAME $WIS2BOX_WEBAPP_PASSWORD || true
fi

# Check if the path is restricted and capture the output
Expand Down