Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mysql -u user1 -pPASs --database=test --reconnect --batch -N -e "call event_notification()" | while read host to from body;
- do
- JSON_STRING=$( jq -n \
- --arg from1 "$from@$host" \
- --arg bo1 "$body" \
- '{to: $from1, body: $bo1}' );
- curl --insecure -H "Authorization:Basic bm9000=" -H "Content-Type: application/json" -X POST https://0.0.:8089/api/messages --data "$JSON_STRING"
- done;
Add Comment
Please, Sign In to add comment