Browse Source

fixing timing

afeiszli 2 years ago
parent
commit
4243fc89fd
1 changed files with 5 additions and 2 deletions
  1. 5 2
      scripts/nm-quick.sh

+ 5 - 2
scripts/nm-quick.sh

@@ -241,9 +241,9 @@ SERVER_ID=$(jq -r '.[0].id' <<< ${curlresponse})
 
 
 curl -s -o /dev/null -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/vpn/$SERVER_ID/createingress
 curl -s -o /dev/null -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/vpn/$SERVER_ID/createingress
 
 
-echo "waiting 10 seconds for server to apply configuration..."
+echo "waiting 5 seconds for server to apply configuration..."
 
 
-sleep 10
+sleep 5
 
 
 
 
 echo "configuring netmaker server vpn gateway..."
 echo "configuring netmaker server vpn gateway..."
@@ -262,6 +262,8 @@ EGRESS_JSON=$( jq -n \
 echo "egress json: $EGRESS_JSON"
 echo "egress json: $EGRESS_JSON"
 curl -s -o /dev/null -X POST -d "$EGRESS_JSON" -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/vpn/$SERVER_ID/creategateway
 curl -s -o /dev/null -X POST -d "$EGRESS_JSON" -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/vpn/$SERVER_ID/creategateway
 
 
+sleep 3
+
 echo "creating client configs..."
 echo "creating client configs..."
 
 
 for ((a=1; a <= $NUM_CLIENTS; a++))
 for ((a=1; a <= $NUM_CLIENTS; a++))
@@ -271,6 +273,7 @@ do
                   '{clientid: $clientid}' )
                   '{clientid: $clientid}' )
 
 
         curl -s -o /dev/null -d "$CLIENT_JSON" -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/extclients/vpn/$SERVER_ID
         curl -s -o /dev/null -d "$CLIENT_JSON" -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/extclients/vpn/$SERVER_ID
+        sleep 2
 done
 done
 
 
 echo "finished configuring vpn server."
 echo "finished configuring vpn server."