Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- opkg install curl jq
- curl --silent http://localhost:79/rci/show/ip/hotspot | \
- jq -c '.host[] | select(.dhcp.static != null) | {ids: [.ip], name: .name, tags: [], upstreams : [], use_global_blocked_services: true, use_global_settings: true}' | \
- while read postbody; do
- curl --header 'Content-Type: application/json' --request POST --data-binary "$postbody" http://user:pass@localhost:3000/control/clients/add
- done
- #!/bin/sh
- API='http://user:pass@localhost:3000/control'
- curl --silent $API/clients | jq -c '.clients[] | {name: .name}' | \
- while read postbody; do
- curl --header 'Content-Type: application/json' --request POST --data-binary "$postbody" $API/clients/delete
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement