Skip to content

Instantly share code, notes, and snippets.

@dustinmm80
Last active August 29, 2015 14:22
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 dustinmm80/9eec75c911feac53ed22 to your computer and use it in GitHub Desktop.
Save dustinmm80/9eec75c911feac53ed22 to your computer and use it in GitHub Desktop.
Reports from Conjur demos - WIP
#!/bin/bash
DEMO_NAME=$1
TAG_NAME="demo-factory/email"
INSTANCE_ID="`wget -qO- http://instance-data/latest/meta-data/instance-id`"
REGION="`wget -qO- http://instance-data/latest/meta-data/placement/availability-zone | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`"
TAG_VALUE="`aws ec2 describe-tags --filters "Name=resource-id,Values=${INSTANCE_ID}" "Name=key,Values=${TAG_NAME}" --region ${REGION} --output=text | cut -f5 | tr -d '\n'`"
URL="http://track.hubspot.com/v1/event?_n=000000294287&_a=402893&email=${TAG_VALUE}&_latest_demo_started=${DEMO_NAME}"
wget -qO- ${URL} &> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment