Last active
February 14, 2016 07:49
-
-
Save elblivion/eb714b33549f002da05b to your computer and use it in GitHub Desktop.
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 | |
AZ=`ec2metadata | grep ^availability-zone | cut -f 2 -d" "` | |
REGION=`ec2metadata | grep ^availability-zone | cut -f 2 -d" " | sed 's/.$//'` | |
INSTANCE=`ec2metadata | grep ^instance-id | cut -f 2 -d" "` | |
trap "echo \"New instance $INSTANCE failed setup\" | \ | |
/usr/local/bin/gofog sns publish -r ${sns_region} -t ${sns_topic} \ | |
-s \"New instance $INSTANCE failed setup\"" ERR | |
set -e | |
# do stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment