diff --git a/infrastructure/userdata.sh b/infrastructure/userdata.sh index db8a3e0..49d5361 100644 --- a/infrastructure/userdata.sh +++ b/infrastructure/userdata.sh @@ -1,11 +1,12 @@ #!/bin/sh -yum update -y -yum install -y python3-pip git -amazon-linux-extras install nginx1 +# Update system and install required packages +dnf update -y +dnf install -y python3-pip git cronie nginx certbot python3-certbot-nginx -pip3 install --upgrade pip -pip3 install certbot certbot-nginx +# Start and enable crond service +systemctl start crond +systemctl enable crond cd /home/ec2-user