Last active
August 29, 2015 14:22
-
-
Save dustinmm80/9eec75c911feac53ed22 to your computer and use it in GitHub Desktop.
Reports from Conjur demos - WIP
This file contains 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 | |
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