浏览代码

added NEWFILENAME var

master
HMSheets 3 年前
父节点
当前提交
605f4306a8
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      update-NebulaNodeCert

+ 4
- 0
update-NebulaNodeCert 查看文件

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

正在加载...
取消
保存