ansible/files/ha_new_cert.sh

14 lines
347 B
Bash
Raw Normal View History

2022-03-01 23:30:08 +00:00
#/bin/bash
set -e
sudo certbot certonly --standalone -d "$1" \
--non-interactive \
--agree-tos \
--email contacto@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