Skip to content

Instantly share code, notes, and snippets.

@vicendominguez
Created December 17, 2015 11:52
Show Gist options
  • Save vicendominguez/368dcbc82d6fd943d12e to your computer and use it in GitHub Desktop.
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)
#!/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