|
@@ -24,10 +24,10 @@ esac |
|
|
done |
|
|
done |
|
|
set -- "${POSITIONAL[@]}" # restore positional parameters |
|
|
set -- "${POSITIONAL[@]}" # restore positional parameters |
|
|
|
|
|
|
|
|
#if [[ -n $1 ]]; then |
|
|
|
|
|
# echo "Invalid Parameter(s) Entered: $1" |
|
|
|
|
|
# exit |
|
|
|
|
|
#fi |
|
|
|
|
|
|
|
|
if [[ -n $1 ]]; then |
|
|
|
|
|
echo "Invalid Parameter(s) Entered: $1" |
|
|
|
|
|
exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
#if [[ -n ${IPADDRESS} ]]; then |
|
|
#if [[ -n ${IPADDRESS} ]]; then |
|
|
# echo "IP Address = ${IPADDRESS}" |
|
|
# echo "IP Address = ${IPADDRESS}" |
|
@@ -36,7 +36,16 @@ set -- "${POSITIONAL[@]}" # restore positional parameters |
|
|
NODENAME=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s .[].details.name | sed 's/["]//g') |
|
|
NODENAME=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s .[].details.name | sed 's/["]//g') |
|
|
NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.ips | sed 's/[]["]//g') |
|
|
NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.ips | sed 's/[]["]//g') |
|
|
NODEGROUPS=($(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.groups | sed 's/[]["]//g' | sed 's/,/ /g')) |
|
|
NODEGROUPS=($(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.groups | sed 's/[]["]//g' | sed 's/,/ /g')) |
|
|
|
|
|
CERTISCASTATUS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.isCa) |
|
|
|
|
|
|
|
|
|
|
|
if [[ $CERTISCASTATUS == true ]]; then |
|
|
|
|
|
echo "Certificate is the root CA Certificate. Try again with a node certificate." |
|
|
|
|
|
exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
echo "Node Name: ${NODENAME}" |
|
|
|
|
|
echo "Node IPs: ${NODEIPS}" |
|
|
|
|
|
echo "Node Groups: ${NODEGROUPS[@]}" |
|
|
|
|
|
|
|
|
if [[ $CERTISCASTATUS == false ]]; then |
|
|
|
|
|
echo "Node Name: ${NODENAME}" |
|
|
|
|
|
echo "Node IPs: ${NODEIPS}" |
|
|
|
|
|
echo "Node Groups: ${NODEGROUPS[@]}" |
|
|
|
|
|
echo "Certificate isCa Status: ${CERTISCASTATUS}" |
|
|
|
|
|
fi |