add check for existing pem file
This commit is contained in:
parent
4aa1ec119a
commit
322bf2a82d
|
@ -57,7 +57,13 @@ done
|
||||||
# check for domain (hostname)
|
# check for domain (hostname)
|
||||||
if [[ -z $domain ]]; then
|
if [[ -z $domain ]]; then
|
||||||
echo "domain (hostname) is required"
|
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
|
fi
|
||||||
|
|
||||||
# set vars
|
# set vars
|
||||||
|
|
Loading…
Reference in New Issue
Block a user