Bladeren bron

fixed variable naming and parameter removal

master
HMSheets 3 jaren geleden
bovenliggende
commit
cd95dcf89e
1 gewijzigde bestanden met toevoegingen van 6 en 11 verwijderingen
  1. +6
    -11
      update-NebulaNodeCert

+ 6
- 11
update-NebulaNodeCert Bestand weergeven

@@ -6,13 +6,8 @@ do
key="$1"

case $key in
-c|--nodecertpath)
NODECERTPATH="$2"
shift # past argument
shift # past value
;;
-b|--nebulacertbinpath)
NEBULACERTBINPATH="$2"
-c|--nodecertname)
NODECERTNAME="$2"
shift # past argument
shift # past value
;;
@@ -36,10 +31,10 @@ fi

DATETIME=$(date '+%Y%m%d-%H%M%S')

NODENAME=$(${ROOTPATH}/nebula-cert print -path ${NODECERTPATH} -json | jq -s .[].details.name | sed 's/["]//g')
NODEIPS=$(${ROOTPATH}/nebula-cert print -path ${NODECERTPATH} -json | jq -s --compact-output .[].details.ips | sed 's/[]["]//g')
NODEGROUPS=$(${ROOTPATH}/nebula-cert print -path ${NODECERTPATH} -json | jq -s --compact-output .[].details.groups | sed 's/[]["]//g') # | sed 's/,/ /g'))
CERTISCASTATUS=$(${ROOTPATH}/nebula-cert print -path ${NODECERTPATH} -json | jq -s --compact-output .[].details.isCa)
NODENAME=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${NODECERTNAME} -json | jq -s .[].details.name | sed 's/["]//g')
NODEIPS=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${NODECERTNAME} -json | jq -s --compact-output .[].details.ips | sed 's/[]["]//g')
NODEGROUPS=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${NODECERTNAME} -json | jq -s --compact-output .[].details.groups | sed 's/[]["]//g') # | sed 's/,/ /g'))
CERTISCASTATUS=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${NODECERTNAME} -json | jq -s --compact-output .[].details.isCa)

# Create new file name variable
NEWFILENAME="${NODENAME}_${DATETIME}"


Laden…
Annuleren
Opslaan