mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-08 04:45:01 +00:00

- URL based configuration - Only prefixed output lines are notified - HTTP notifier: send a JSON with notification in the text attribute - SMTP notifier: send an email with notification text in body
17 lines
476 B
Bash
Executable File
17 lines
476 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Running simple test script..."
|
|
|
|
echo "Testing parameters..."
|
|
[ -z "$name" ] && echo "Name variable undefined" && exit 1
|
|
[ -z "$user_agent" ] && echo "User-Agent variable undefined" && exit 1
|
|
[ "$user_agent" != "test" ] && echo "Invalid User-Agent variable: $user_agent" && exit 1
|
|
|
|
echo "Testing payload..."
|
|
[ -z "$1" ] && echo "Payload undefined" && exit 1
|
|
[ "$1" != "{\"foo\": \"bar\"}" ] && echo "Invalid payload: $1" && exit 1
|
|
|
|
echo "notify: OK"
|
|
|
|
exit 0
|