Created
December 17, 2015 11:52
-
-
Save vicendominguez/368dcbc82d6fd943d12e to your computer and use it in GitHub Desktop.
my shellscript to integrate hubot + zabbix + hangouts (post method inside is adapted to hangups)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="http://gw.url.net:40001/proxy/" | |
ID="$1" | |
MESSAGE="$2" | |
if [ -z "$ID" ] | |
then | |
echo 'ID param not found' | |
exit 1 | |
fi | |
if [ -z "$MESSAGE" ] | |
then | |
echo 'MESSAGE param not found!' | |
exit 1 | |
fi | |
MESSAGE="Hey!: $2" | |
curl -vvvv -H "Accept: application/json" -H "Content-type: application/json" -X POST -d "{\"conversationId\":\"$ID\",\"message\":\"$MESSAGE\"}" $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment