Correct if statement

This commit is contained in:
jacob.eva 2023-09-21 18:39:51 +01:00
parent b5b1d5911b
commit 740c0ce506
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E

View File

@ -21,7 +21,7 @@ for vhost in ${domains[@]}; do # for each vhost
((index++))
[ ! -d "$certdir[$index]" ] && # if there is no certificate for the domain
if [ systemctl is-active --quiet nginx ]
if systemctl is-active --quiet nginx
then
pacman -S --noconfirm python3-certbot-nginx
certbot -d "$vhost" certonly --nginx --register-unsafely-without-email --agree-tos # request cert with nginx