docs/example/app/user-data/bootstrap.sh in aws-ec2-1.0.0 vs docs/example/app/user-data/bootstrap.sh in aws-ec2-1.1.0

- old
+ new

@@ -1,19 +1,7 @@ #!/bin/bash -exu -exec > >(tee "/var/log/user-data.log" | logger -t user-data -s 2>/dev/console) 2>&1 export HOME=/root # user-data env runs in weird shell where user is root but HOME is not set -<% pubkey_path = "#{ENV['HOME']}/.ssh/id_rsa.pub" -%> -<% if File.exist?(pubkey_path) -%> -<% pubkey = IO.read(pubkey_path).strip -%> -# Automatically add user's public key -echo <%= pubkey %> >> ~/.ssh/authorized_keys -echo <%= pubkey %> >> /home/ec2-user/.ssh/authorized_keys -chown ec2-user:ec2-user /home/ec2-user/.ssh/authorized_keys -<% else %> -# WARN: unable to find a ~/.ssh/id_rsa.pub locally on your machine. user: <%= ENV['USER'] %> -# Unable to automatically add the public key -<% end -%> sudo yum install -y postgresql # https://gist.github.com/juno/1330165 # Install developer tools