Fixed acme.sh installation in userdata.sh
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m20s

This commit is contained in:
2025-05-20 14:48:26 -05:00
parent 37be1f3f91
commit 594ce0c67a

View File

@@ -32,11 +32,14 @@ Restart=always
WantedBy=multi-user.target
EOF
# Ensure root has a crontab before installing acme.sh
crontab -u root -l >/dev/null 2>&1 || (echo "" | crontab -u root -)
# Install and configure acme.sh
curl https://get.acme.sh | sh -s email=stefano@fiorinis.com
# Configure acme.sh to use DNS API for FreeDNS
. "/root/.acme.sh/acme.sh.env"
. "/.acme.sh/acme.sh.env"
acme.sh --issue --dns dns_freedns -d ${DOMAIN_NAME} -d *.${DOMAIN_NAME}
sudo mkdir -p /etc/nginx/ssl
acme.sh --install-cert -d ${DOMAIN_NAME} -d *.${DOMAIN_NAME} \