Sfoglia il codice sorgente

Добавил проверку в какой окружении запускается сервис, если в dev - то генерация сертификатов/ключей и обновление их не возможна.

tomishinets.v 6 anni fa
parent
commit
071e095932
2 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 2 0
      generate.sh
  2. 2 0
      renewal.sh

+ 2 - 0
generate.sh

@@ -5,6 +5,8 @@ branch="100883"
 log_file="/var/log/letsencrypt/letsencrypt.log"
 #git_url="git.sdsys.ru/sdsys/pki.git"
 
+[[ -z ${GIT_REPO} ]] && exit 0
+
 function mail_send {
               echo "${message}"|mail -s "Attention! Certificate status!" \
               -S smtp=${SMTP_SERVER} \

+ 2 - 0
renewal.sh

@@ -5,6 +5,8 @@ branch="100883"
 log_file="/var/log/letsencrypt/letsencrypt.log"
 #git_url="git.sdsys.ru/sdsys/pki.git"
 
+[[ -z ${GIT_REPO} ]] && exit 0
+
 function mail_send {
               echo "${message}"|mail -s "Attention! Certificate status!" \
               -S smtp=${SMTP_SERVER} \