From 3f43c32bd258f51be769ef645671694eb0aa5dad Mon Sep 17 00:00:00 2001
From: "p.delpy@dkfz-heidelberg.de"
Date: Wed, 9 Aug 2023 09:10:20 +0200
Subject: [PATCH] refactor addUser code
---
bridgehead | 6 +++++-
lib/sitespecific-functions.sh | 11 -----------
2 files changed, 5 insertions(+), 12 deletions(-)
delete mode 100755 lib/sitespecific-functions.sh
diff --git a/bridgehead b/bridgehead
index 5319620..37e7e7b 100755
--- a/bridgehead
+++ b/bridgehead
@@ -104,7 +104,11 @@ case "$ACTION" in
;;
addUser)
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)
loadVars
diff --git a/lib/sitespecific-functions.sh b/lib/sitespecific-functions.sh
deleted file mode 100755
index 04db02e..0000000
--- a/lib/sitespecific-functions.sh
+++ /dev/null
@@ -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
\ No newline at end of file