keycreate.sh 269 B

12345678910111213141516
  1. #!/bin/bash
  2. USES=1000
  3. generate_post_json ()
  4. {
  5. cat <<EOF
  6. {
  7. "uses": $USES
  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" localhost:8082/api/networks/skynet/keys