ansible/files/ha_new_cert.sh

14 lines
348 B
Bash

#/bin/bash
set -e
sudo certbot certonly --standalone -d "$1" \
--non-interactive \
--agree-tos \
--email webmaster@ansol.org \
--preferred-challenges http \
--http-01-address 127.0.0.1 \
--http-01-port 8888 \
cat /etc/letsencrypt/live/"$1"/fullchain.pem /etc/letsencrypt/live/"$1"/privkey.pem > /etc/haproxy/ssl/"$1".pem