Skip to content

Commit

Permalink
trim double quotes from netmaker token
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Sep 6, 2024
1 parent f475aba commit cc003c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/nm-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ setup_mesh() {
local netmakerTag=$(nmctl enrollment_key list | jq '.[] | .tags[0]' | tr -d '"')
if [ ${netmakerTag} = "netmaker" ]; then
# key exists already, fetch token
TOKEN=$(nmctl enrollment_key list | jq '.[] | select(.tags[0]=="netmaker") | .token')
TOKEN=$(nmctl enrollment_key list | jq '.[] | select(.tags[0]=="netmaker") | .token' | tr -d '"')
else
local tokenJson=$(nmctl enrollment_key create --tags netmaker --unlimited --networks netmaker)
TOKEN=$(jq -r '.token' <<<${tokenJson})
Expand Down

0 comments on commit cc003c8

Please sign in to comment.