Переглянути джерело

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 роки тому
джерело
коміт
037b9202a6
Аккаунт користувача з таким Email не знайдено
1 змінених файлів з 3 додано та 1 видалено
  1. 3
    1
      resources/install-letsencrypt-cert.sh

+ 3
- 1
resources/install-letsencrypt-cert.sh Переглянути файл

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

Завантаження…
Відмінити
Зберегти