Commit 56371122 by John Jarvis

use ec2metadata

parent 0c881b70
......@@ -94,9 +94,9 @@ onerror() {
trap onerror ERR SIGHUP SIGINT SIGTERM
# first security group is used as the directory name in the bucket
sec_grp=$(curl -s http://169.254.169.254/latest/meta-data/security-groups | head -1)
instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
ip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
sec_grp=$(ec2metadata --security-groups | head -1)
instance_id=$(ec2metadata --instance-id)
ip=$(ec2metadata --local-ipv4)
s3_path="${2}/$sec_grp/"
{% for item in COMMON_S3_LOG_PATHS -%}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment