Skip to content

Instantly share code, notes, and snippets.

@ngs
Created June 28, 2014 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngs/d251721adde1f0a525a2 to your computer and use it in GitHub Desktop.
Save ngs/d251721adde1f0a525a2 to your computer and use it in GitHub Desktop.
#!/bin/sh
HIPCHAT_ROOM_ID=$1
HIPCHAT_MESSAGE=$2
HIPCHAT_FROM='Deploy Notifier'
RES=$(curl -s https://api.hipchat.com/v1/rooms/message -d "auth_token=$HIPCHAT_TOKEN&room_id=$HIPCHAT_ROOM_ID&from=$HIPCHAT_FROM&message=$HIPCHAT_MESSAGE&notify=1&message_format=text")
if [ $RES = '{"status":"sent"}' ]; then
echo "Notification sent to room#$HIPCHAT_ROOM_ID"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment