Javi

AWS: Arranchar apache con instance-id

Feb 11th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. yum install -y httpd
  4. name=$(curl http://169.254.169.254/latest/meta-data/instance-id)
  5. echo "<html><body>I am $name</body></html>" > /var/www/html/index.html
  6. /etc/init.d/httpd start
Add Comment
Please, Sign In to add comment