Browse Source

added ca cert and key parameters

master
HMSheets 3 years ago
parent
commit
0650240128
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      update-NebulaNodeCert

+ 12
- 2
update-NebulaNodeCert View File

@@ -6,7 +6,7 @@ do
key="$1" key="$1"


case $key in case $key in
-c|--nodecertname)
-n|--nodecertname)
NODECERTNAME="$2" NODECERTNAME="$2"
shift # past argument shift # past argument
shift # past value shift # past value
@@ -16,6 +16,16 @@ case $key in
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
-c|--cacertname)
CACERTNAME="$2"
shift # past argument
shift # past value
;;
-k|--cakeyname)
CAKEYNAME="$2"
shift # past argument
shift # past value
;;
*) # unknown option *) # unknown option
POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
shift # past argument shift # past argument
@@ -53,5 +63,5 @@ if [[ $CERTISCASTATUS == false ]]; then
echo "DateTime: ${DATETIME}" echo "DateTime: ${DATETIME}"
echo "NEWFILENAME: ${NEWFILENAME}" echo "NEWFILENAME: ${NEWFILENAME}"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
${ROOTPATH}/nebula-cert sign -groups ${NODEGROUPS[@]} -ip ${NODEIPS} -name ${NODENAME} -ca-crt ${ROOTPATH}/ca.crt -ca-key ${ROOTPATH}/ca.key -out-crt ${ROOTPATH}/${NEWFILENAME}.crt -out-key ${ROOTPATH}/${NEWFILENAME}.key
${ROOTPATH}/nebula-cert sign -groups ${NODEGROUPS[@]} -ip ${NODEIPS} -name ${NODENAME} -ca-crt ${ROOTPATH}/${CACERTNAME} -ca-key ${ROOTPATH}/${CAKEYNAME} -out-crt ${ROOTPATH}/${NEWFILENAME}.crt -out-key ${ROOTPATH}/${NEWFILENAME}.key
fi fi

Loading…
Cancel
Save