1 |
|
2 |
|
3 | echo "growl notify $1"$'\n' >&2
|
4 |
|
5 | if [[ -z "$1" ]]; then
|
6 | echo "usage: $0 '<json string>'"
|
7 | exit 1
|
8 | fi
|
9 |
|
10 | if [[ -z "$MACHINE_HOST" ]]; then
|
11 | MACHINE_HOST=localhost
|
12 | fi
|
13 |
|
14 | curl --connect-timeout 3 --silent \
|
15 | --header "Content-Type: application/json" --request POST \
|
16 | --data "$1" http://$MACHINE_HOST:23054/notify 2>/dev/null
|