diff --git a/bin/hsadmin-ng b/bin/hsadmin-ng index 40a0dc4e..50f88b8f 100755 --- a/bin/hsadmin-ng +++ b/bin/hsadmin-ng @@ -31,7 +31,6 @@ else fi if [ -z "$HSADMINNG_CAS_LOGIN" ] || [ -z "$HSADMINNG_CAS_VALIDATE" ] || \ - [ -z "$HSADMINNG_CAS_USERNAME" ] || [ -z "$HSADMINNG_CAS_PASSWORD" ] || \ [ -z "$HSADMINNG_CAS_SERVICE" ]; then cat >&2 <> - export HSADMINNG_CAS_PASSWORD=<> + export HSADMINNG_CAS_USERNAME=<> export HSADMINNG_CAS_SERVICE=https://hsadminng.hostsharing.net:443/ EOF exit 1 fi function casLogin() { + + if [ -z "$HSADMINNG_CAS_USERNAME" ]; then + read -p "Username: " HSADMINNG_CAS_USERNAME + fi + + if [ -z "$HSADMINNG_CAS_PASSWORD" ]; then + read -p "Password: " HSADMINNG_CAS_PASSWORD + fi + HSADMINNG_CAS_TGT=`doCurl -s -i -X POST \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d "username=$HSADMINNG_CAS_USERNAME&password=$HSADMINNG_CAS_PASSWORD" \