mirror of https://github.com/samply/bridgehead.git
Merge pull request #108 from samply/feature/custom-basic-auth
refactor addUser to adduser - lowercase
This commit is contained in:
commit
6af6dae6b6
|
@ -102,7 +102,7 @@ case "$ACTION" in
|
||||||
uninstall)
|
uninstall)
|
||||||
exec ./lib/uninstall-bridgehead.sh $PROJECT
|
exec ./lib/uninstall-bridgehead.sh $PROJECT
|
||||||
;;
|
;;
|
||||||
addUser)
|
adduser)
|
||||||
loadVars
|
loadVars
|
||||||
log "INFO" "Adding encrypted credentials in /etc/bridgehead/$PROJECT.local.conf"
|
log "INFO" "Adding encrypted credentials in /etc/bridgehead/$PROJECT.local.conf"
|
||||||
read -p "Please choose the component (LDM_AUTH|NNGM_AUTH) you want to add a user to : " COMPONENT
|
read -p "Please choose the component (LDM_AUTH|NNGM_AUTH) you want to add a user to : " COMPONENT
|
||||||
|
|
|
@ -26,7 +26,7 @@ checkOwner(){
|
||||||
}
|
}
|
||||||
|
|
||||||
printUsage() {
|
printUsage() {
|
||||||
echo "Usage: bridgehead start|stop|is-running|update|install|uninstall|addUser|enroll PROJECTNAME"
|
echo "Usage: bridgehead start|stop|is-running|update|install|uninstall|adduser|enroll PROJECTNAME"
|
||||||
echo "PROJECTNAME should be one of ccp|bbmri"
|
echo "PROJECTNAME should be one of ccp|bbmri"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,13 +30,13 @@ EOF
|
||||||
|
|
||||||
# TODO: Determine whether this should be located in setup-bridgehead (triggered through bridgehead install) or in update bridgehead (triggered every hour)
|
# TODO: Determine whether this should be located in setup-bridgehead (triggered through bridgehead install) or in update bridgehead (triggered every hour)
|
||||||
if [ -z "$LDM_AUTH" ]; then
|
if [ -z "$LDM_AUTH" ]; then
|
||||||
log "INFO" "Now generating basic auth for the local data management (see addUser in bridgehead for more information). "
|
log "INFO" "Now generating basic auth for the local data management (see adduser in bridgehead for more information). "
|
||||||
generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
|
generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
|
||||||
add_basic_auth_user $PROJECT $generated_passwd "LDM_AUTH" $PROJECT
|
add_basic_auth_user $PROJECT $generated_passwd "LDM_AUTH" $PROJECT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$NNGM_CTS_APIKEY" ] && [ -z "$NNGM_AUTH" ]; then
|
if [ ! -z "$NNGM_CTS_APIKEY" ] && [ -z "$NNGM_AUTH" ]; then
|
||||||
log "INFO" "Now generating basic auth for nNGM upload API (see addUser in bridgehead for more information). "
|
log "INFO" "Now generating basic auth for nNGM upload API (see adduser in bridgehead for more information). "
|
||||||
generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
|
generated_passwd="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 32)"
|
||||||
add_basic_auth_user "nngm" $generated_passwd "NNGM_AUTH" $PROJECT
|
add_basic_auth_user "nngm" $generated_passwd "NNGM_AUTH" $PROJECT
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue