From b0ba4cee74f3b7e8dbc420853e6b90687570fbb4 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Thu, 21 Sep 2023 19:35:05 +0100 Subject: [PATCH] Set certdir after requesting --- xmpp-wizard.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xmpp-wizard.sh b/xmpp-wizard.sh index 9cd2bd3..2b2606a 100644 --- a/xmpp-wizard.sh +++ b/xmpp-wizard.sh @@ -22,10 +22,12 @@ for vhost in ${domains[@]}; do # for each vhost if systemctl is-active --quiet nginx then pacman -S --noconfirm certbot-nginx - certbot -d "$vhost" certonly --nginx --register-unsafely-without-email --agree-tos # request cert with nginx + certbot -d "$vhost" certonly --nginx --register-unsafely-without-email --agree-tos && + certdir[$index]="/etc/letsencrypt/live/$vhost" # request cert with nginx else pacman -S --noconfirm certbot - certbot -d "$vhost" certonly --standalone --register-unsafely-without-email --agree-tos # request cert with certbot + certbot -d "$vhost" certonly --standalone --register-unsafely-without-email --agree-tos && + certdir[$index]="/etc/letsencrypt/live/$vhost" # request cert with certbot fi [ ! -d "$certdir[$index]" ] && echo "Error locating or installing SSL certificate." && exit 1 done