refactor addUser code

This commit is contained in:
p.delpy@dkfz-heidelberg.de 2023-08-09 09:10:20 +02:00
parent dc0fc286b1
commit 3f43c32bd2
2 changed files with 5 additions and 12 deletions

View File

@ -104,7 +104,11 @@ case "$ACTION" in
;; ;;
addUser) addUser)
loadVars loadVars
exec ./lib/sitespecific-functions.sh $PROJECT 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 enter a username: " USER
read -s -p "Please enter a password (will not be echoed): "$'\n' PASSWORD
add_basic_auth_user $USER $PASSWORD $COMPONENT $PROJECT
;; ;;
enroll) enroll)
loadVars loadVars

View File

@ -1,11 +0,0 @@
#!/bin/bash -e
source lib/functions.sh
PROJECT=$1
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 enter a username: " USER
read -s -p "Please enter a password (will not be echoed): "$'\n' PASSWORD
add_basic_auth_user $USER $PASSWORD $COMPONENT $PROJECT