2022-03-28 15:34:57 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
echo "This script add's a user with password to the bridghead"
|
|
|
|
read -p 'Username: ' bc_user
|
|
|
|
read -sp 'Password: ' bc_password
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
bc=$(docker run --rm -ti xmartlabs/htpasswd $bc_user $bc_password)
|
|
|
|
|
|
|
|
if [ -z $bc_auth_users ]; then
|
2022-04-04 14:02:03 +02:00
|
|
|
printf "Please run: export bc_auth_users=\"%q\"" $bc
|
2022-03-28 15:34:57 +02:00
|
|
|
else
|
2022-04-04 14:02:03 +02:00
|
|
|
echo "Please run: export bc_auth_users=\"${bc},$bc_auth_users\""
|
|
|
|
fi
|