Skip to content

Commit

Permalink
update meta data field
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Oct 7, 2024
1 parent 1e8ce1f commit 961077f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/nm-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ configure_netclient() {
if [ "$INSTALL_TYPE" = "pro" ]; then
INET_NODE_ID=$(sudo cat /etc/netclient/nodes.json | jq -r '."internet-access-vpn".id')
nmctl node create_remote_access_gateway internet-access-vpn $INET_NODE_ID
out=$(nmctl node list -o json | jq -r '.[] | select(.id=='\"$INET_NODE_ID\"') | .ingressdns = "8.8.8.8", .metadata = "This host can be used for secure internet access"')
out=$(nmctl node list -o json | jq -r '.[] | select(.id=='\"$INET_NODE_ID\"') | .ingressdns = "8.8.8.8"')
curl --location --request PUT "https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/internet-access-vpn/${INET_NODE_ID}" --data "$out" --header "Authorization: Bearer ${MASTER_KEY}"
out=$(nmctl node list -o json | jq -r '.[] | select(.id=='\"$INET_NODE_ID\"') | .metadata = "This host can be used for secure internet access"')
curl --location --request PUT "https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/internet-access-vpn/${INET_NODE_ID}" --data "$out" --header "Authorization: Bearer ${MASTER_KEY}"
curl --location --request POST "https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/internet-access-vpn/${INET_NODE_ID}/inet_gw" --data '{}' --header "Authorization: Bearer ${MASTER_KEY}"
fi
Expand Down

0 comments on commit 961077f

Please sign in to comment.