gatewaycreate.sh 310 B

12345678910111213141516
  1. #!/bin/bash
  2. generate_post_json ()
  3. {
  4. cat <<EOF
  5. {
  6. "rangestring": "172.31.0.0/16",
  7. "interface": "eth0"
  8. }
  9. EOF
  10. }
  11. POST_JSON=$(generate_post_json)
  12. curl --max-time 5.0 -d "$POST_JSON" -H 'Content-Type: application/json' -H "authorization: Bearer secretkey" 3.86.23.0:8081/api/nodes/default/12:5a:ac:3f:03:2d