|
|
@@ -7,6 +7,25 @@ |
|
|
|
# Created By: HMSheets |
|
|
|
###################################################### |
|
|
|
|
|
|
|
invalid_args_msg () { |
|
|
|
echo "Invalid Parameter(s) Entered: $1" |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
help_msg () { |
|
|
|
echo "Usage of refresh-NebulaCA <flags>: refresh an existing nebula ca" |
|
|
|
echo " -n|--caname" |
|
|
|
echo " Name to use for the new CA. Used in the CA cert file and in the filename" |
|
|
|
echo " -r|--rootpath" |
|
|
|
echo " Root path of existing CA" |
|
|
|
echo " -f|--cafilename" |
|
|
|
echo " Filename of the existing CA" |
|
|
|
echo " -i|--issuer" |
|
|
|
echo " Name of the Org Issuing and authorizing the creation of the new Nebula CA" |
|
|
|
echo " -h|--help" |
|
|
|
echo " This help text, but you already knew that... right?!?!" |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
POSITIONAL=() |
|
|
|
while [[ $# -gt 0 ]] |
|
|
@@ -49,26 +68,6 @@ esac |
|
|
|
done |
|
|
|
set -- "${POSITIONAL[@]}" # restore positional parameters |
|
|
|
|
|
|
|
invalid_args_msg () { |
|
|
|
echo "Invalid Parameter(s) Entered: $1" |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
help_msg () { |
|
|
|
echo "Usage of refresh-NebulaCA <flags>: refresh an existing nebula ca" |
|
|
|
echo " -n|--caname" |
|
|
|
echo " Name to use for the new CA. Used in the CA cert file and in the filename" |
|
|
|
echo " -r|--rootpath" |
|
|
|
echo " Root path of existing CA" |
|
|
|
echo " -f|--cafilename" |
|
|
|
echo " Filename of the existing CA" |
|
|
|
echo " -i|--issuer" |
|
|
|
echo " Name of the Org Issuing and authorizing the creation of the new Nebula CA" |
|
|
|
echo " -h|--help" |
|
|
|
echo " This help text, but you already knew that... right?!?!" |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
DATETIME=$(date '+%Y%m%d-%H%M%S') |
|
|
|
|
|
|
|
#CANAME=$(${ROOTPATH}/nebula-cert print -path ${ROOTPATH}/${NODECERTNAME} -json | jq -s .[].details.name | sed 's/["]//g') |
|
|
|