mirror of https://github.com/samply/bridgehead.git
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 ..."
|
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
||||||
checkRequirements
|
checkRequirements
|
||||||
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
||||||
set -a
|
export LDM_LOGIN=$(getLdmPassword)
|
||||||
setLdmPassword
|
|
||||||
set +a
|
|
||||||
exec $COMPOSE -f ./$PROJECT/docker-compose.yml $OVERRIDE up --abort-on-container-exit
|
exec $COMPOSE -f ./$PROJECT/docker-compose.yml $OVERRIDE up --abort-on-container-exit
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
|
|
@ -11,10 +11,11 @@ detectCompose() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setLdmPassword() {
|
getLdmPassword() {
|
||||||
if [ -n "$LDM_PASSWORD" ]; then
|
if [ -n "$LDM_PASSWORD" ]; then
|
||||||
log DEBUG "Transforming LDM_PASSWORD into LDM_LOGIN ..."
|
docker run --rm httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r'
|
||||||
export LDM_LOGIN=$(docker run --rm -it httpd:alpine htpasswd -nb $PROJECT $LDM_PASSWORD | tr -d '\n' | tr -d '\r')
|
else
|
||||||
|
echo -n ""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue