Browse Source

added NEWFILENAME var

master
HMSheets 3 years ago
parent
commit
605f4306a8
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      update-NebulaNodeCert

+ 4
- 0
update-NebulaNodeCert View File

@@ -38,6 +38,9 @@ NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-o
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)

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

if [[ $CERTISCASTATUS == true ]]; then
echo "Certificate is the root CA Certificate. Try again with a node certificate."
exit
@@ -49,4 +52,5 @@ if [[ $CERTISCASTATUS == false ]]; then
echo "Node Groups: ${NODEGROUPS[@]}"
echo "Certificate isCa Status: ${CERTISCASTATUS}"
echo "DateTime: ${DATETIME}"
echo "NEWFILENAME: ${NEWFILENAME}"
fi

Loading…
Cancel
Save