From 961077f29dca9826e3173370a00bf996efebd8a9 Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Mon, 7 Oct 2024 16:06:20 +0400 Subject: [PATCH] update meta data field --- scripts/nm-quick.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/nm-quick.sh b/scripts/nm-quick.sh index 902382291..5674b5ae4 100755 --- a/scripts/nm-quick.sh +++ b/scripts/nm-quick.sh @@ -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