|
@@ -107,7 +107,7 @@ DATETIME=$(date '+%Y%m%d-%H%M%S') |
|
|
CERTISCASTATUS=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${CAFILENAME} -json | jq -s --compact-output .[].details.isCa) |
|
|
CERTISCASTATUS=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${CAFILENAME} -json | jq -s --compact-output .[].details.isCa) |
|
|
|
|
|
|
|
|
# Create new file name variable |
|
|
# Create new file name variable |
|
|
NEWFILENAME="${CANAME}_${DATETIME}" |
|
|
|
|
|
|
|
|
NEWFILENAME="${CANAME}-CA_${DATETIME}" |
|
|
|
|
|
|
|
|
if [[ $CERTISCASTATUS == false ]]; then |
|
|
if [[ $CERTISCASTATUS == false ]]; then |
|
|
echo "Certificate is a Node Certificate. Try again by providing the CA Certificate." |
|
|
echo "Certificate is a Node Certificate. Try again by providing the CA Certificate." |
|
@@ -125,7 +125,7 @@ if [[ $CERTISCASTATUS == true ]]; then |
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
|
try |
|
|
try |
|
|
( |
|
|
( |
|
|
${ROOTPATH}/nebula-cert sign -name ${CANAME} -out-crt ${ROOTPATH}/${NEWFILENAME}.crt -out-key ${ROOTPATH}/${NEWFILENAME}.key |
|
|
|
|
|
|
|
|
${ROOTPATH}/nebula-cert ca -name ${CANAME} -out-crt ${ROOTPATH}/${NEWFILENAME}.crt -out-key ${ROOTPATH}/${NEWFILENAME}.key |
|
|
) |
|
|
) |
|
|
catch || { |
|
|
catch || { |
|
|
help_msg |
|
|
help_msg |
|
|