Explorar el Código

added NEWFILENAME var

master
HMSheets hace 3 años
padre
commit
605f4306a8
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      update-NebulaNodeCert

+ 4
- 0
update-NebulaNodeCert Ver fichero

@@ -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

Cargando…
Cancelar
Guardar