commit b3708b421da5fb2989271cb12ee8e3298450e9a2 Author: Faboje Date: Sat Dec 6 22:20:56 2025 +0100 first commit diff --git a/cerbotForHaproxy.sh b/cerbotForHaproxy.sh new file mode 100755 index 0000000..5447dd6 --- /dev/null +++ b/cerbotForHaproxy.sh @@ -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