fix: Fixes Let's Encrypt script. (#11430)

* fix: Fixes Let's Encrypt script.

It fails when certbot is not installed and exits with an error without installing anything.

* squash: Fixes certbot command after install.
This commit is contained in:
Дамян Минков 2022-04-26 06:32:08 -05:00 committed by GitHub
parent 8b8a42e0d1
commit 037b9202a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ echo "by providing an email address for important account notifications"
echo -n "Enter your email and press [ENTER]: "
read EMAIL
CERTBOT="$(command -v certbot)"
CERTBOT="$(command -v certbot || true)"
if [ ! -x "$CERTBOT" ] ; then
DISTRO=$(lsb_release -is)
DISTRO_VERSION=$(lsb_release -rs)
@ -50,6 +50,8 @@ if [ ! -x "$CERTBOT" ] ; then
echo "Only Debian 9,10 and Ubuntu 18.04,19.10,20.04 are supported"
exit 1
fi
CERTBOT="$(command -v certbot)"
fi
CRON_FILE="/etc/cron.weekly/letsencrypt-renew"