This commit is contained in:
Arno
2024-10-26 10:16:37 +00:00
parent 6410bf5e34
commit b5e5a75d36
14 changed files with 118 additions and 79 deletions

View File

@ -0,0 +1,15 @@
#!/bin/bash
if [[ $NINEAPACHE_LETSENCRYPT == 1 ]]
then
# On génère ou renouvel le certificat
echo "CERTIFICAT LETSENCRYPT"
certbot certonly --webroot -w /usr/local/apache2/htdocs -d ${WEB_URL} --non-interactive --agree-tos --email ${ADMIN_EMAIL}
# On supprime la conf ssl pour placer celle de letsencrypt en y placant la web_url
rm -f /etc/apache2/conf.d/ssl.conf
envsubst < "/nine/ssl.conf" > "/etc/apache2/conf.d/ssl.conf"
# On redemarre apache
httpd -k graceful
fi