From e5bc5195dfcdee119ea627462242d551306a2c93 Mon Sep 17 00:00:00 2001 From: hnaumann Date: Wed, 28 Aug 2024 09:22:32 +0200 Subject: [PATCH] adding userscript --- userdata.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 userdata.sh diff --git a/userdata.sh b/userdata.sh new file mode 100644 index 0000000..db03623 --- /dev/null +++ b/userdata.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +sudo yum update -y +sudo yum install -y httpd +sudo systemctl start httpd +sudo systemctl enable httpd +echo "

Hello World


You successfully deployed your first EC2 instance using Terraform

" | sudo tee /var/www/html/index.html +sudo systemctl restart httpd \ No newline at end of file