refactor: certbot stuff

it's weird
This commit is contained in:
Strix 2023-10-20 04:37:44 +02:00
parent fa8abf4b2c
commit b85e943fd1
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

View file

@ -4,9 +4,16 @@ trap exit TERM
if [ -n "${CERTBOT_DOMAINS}" ]; then
echo "registering..."
certbot --nginx -n --keep --agree-tos \
-m "${CERTBOT_EMAIL}" \
-d "${CERTBOT_DOMAINS}"
if ! certbot show_account; then
certbot register -n \
--agree-tos \
-m "${CERTBOT_EMAIL}"
fi
for d in $(echo "${CERTBOT_DOMAINS}" | sed 's/,/ /g'); do
echo "requesting for $d..."
certbot --nginx -n --keep -d "$d"
done
while :; do
echo "renewing domains..."