first commit

This commit is contained in:
Faboje
2025-12-06 22:20:56 +01:00
commit b3708b421d

17
cerbotForHaproxy.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Vérifie qu'un domaine a été passé en argument
if [ -z "$1" ]; then
echo "Usage: $0 domaine.com"
exit 1
fi
DOMAIN="$1"
# Exécution de certbot
certbot certonly --standalone -d "$DOMAIN"
cat /etc/letsencrypt/live/"$DOMAIN"/privkey.pem \
/etc/letsencrypt/live/"$DOMAIN"/fullchain.pem \
> /home/certificate/"$DOMAIN".pem