add check for existing pem file

This commit is contained in:
Matthew Saunders Brown 2023-05-18 16:17:04 -07:00
parent 4aa1ec119a
commit 322bf2a82d

View File

@ -57,7 +57,13 @@ done
# check for domain (hostname)
if [[ -z $domain ]]; then
echo "domain (hostname) is required"
exit
exit 1
fi
# check for existing pem file
if [[ -f /etc/ssl/letsencrypt/$domain.pem ]]; then
echo "pem file for $domain already exists"
exit 1
fi
# set vars