webhookd/scripts/echo.sh

14 lines
234 B
Bash
Raw Normal View History

2018-01-15 10:51:15 +00:00
#!/bin/bash
2018-08-28 15:45:10 +00:00
# Usage: http POST :8080/echo msg==hello foo=bar
2018-01-15 10:51:15 +00:00
2018-08-28 15:45:10 +00:00
echo "Echo script:"
2018-01-15 10:51:15 +00:00
2018-08-28 15:45:10 +00:00
echo "Command result: hostname=`hostname`"
2018-01-15 10:51:15 +00:00
2018-08-28 15:45:10 +00:00
echo "Header variable: User-Agent=$user_agent"
echo "Query parameter: msg=$msg"
echo "Body payload: $1"