Ver código fonte

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.
master
Дамян Минков 3 anos atrás
pai
commit
037b9202a6
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3
    1
      resources/install-letsencrypt-cert.sh

+ 3
- 1
resources/install-letsencrypt-cert.sh Ver arquivo

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

Carregando…
Cancelar
Salvar