Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -ex
- export AWS_DEFAULT_REGION="ap-northeast-1"
- SGID="sg-xxxxxxxx"
- MYIP="`dig +short myip.opendns.com @resolver1.opendns.com`"
- cd $(dirname $(readlink -f $0))
- trap "aws ec2 revoke-security-group-ingress --group-id ${SGID} --protocol tcp --port 22 --cidr ${MYIP}/32" 0 1 2 3 15
- aws ec2 authorize-security-group-ingress --group-id ${SGID} --protocol tcp --port 22 --cidr ${MYIP}/32
- cd ../deploy && ./deploy-to-staging.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement