netmaker/scripts/token-convert.sh

14 lines
270 B
Bash
Raw Normal View History

#!/bin/bash
set -e
token=$1
token_json=$(echo $token | base64 -d)
api_addr=$(echo $token_json | jq -r '.apiconn')
network=$(echo $token_json | jq -r '.network')
key=$(echo $token_json | jq -r '.key')
2022-04-22 03:53:44 +08:00
echo ./netclient join -k $key -n $network --apiserver $api_addr