瀏覽代碼

added sed [, ], and " stripping

master
HMSheets 3 年之前
父節點
當前提交
70e4eeca5d
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      update-NebulaNodeCert

+ 2
- 2
update-NebulaNodeCert 查看文件

@@ -33,8 +33,8 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
# echo "IP Address = ${IPADDRESS}"
#fi

NODENAME=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s .[].details.name)
NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.ips)
NODENAME=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s .[].details.name | sed 's/["]//g')
NODEIPS=$(${NEBULACERTBINPATH} print -path ${CERTPATH} -json | jq -s --compact-output .[].details.ips | sed 's/[\]\["]//g')

echo "Node Name: ${NODENAME}"
echo "Node IPs: ${NODEIPS}"

Loading…
取消
儲存