Fix getting LDM_LOGIN
This commit is contained in:
parent
6cd682e42c
commit
62b8cabb31
|
@ -65,9 +65,7 @@ case "$ACTION" in
|
|||
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
||||
checkRequirements
|
||||
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
||||
set -a
|
||||
setLdmPassword
|
||||
set +a
|
||||
export LDM_LOGIN=$(getLdmPassword)
|
||||
exec $COMPOSE -f ./$PROJECT/docker-compose.yml $OVERRIDE up --abort-on-container-exit
|
||||
;;
|
||||
stop)
|
||||
|
|
|
@ -11,10 +11,11 @@ detectCompose() {
|
|||
fi
|
||||
}
|
||||
|
||||
setLdmPassword() {
|
||||
getLdmPassword() {
|
||||
if [ -n "$LDM_PASSWORD" ]; then
|
||||
log DEBUG "Transforming LDM_PASSWORD into LDM_LOGIN ..."
|
||||
export LDM_LOGIN=$(docker run --rm -it httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r')
|
||||
docker run --rm httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r'
|
||||
else
|
||||
echo -n ""
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue