Преглед изворни кода

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

tomishinets.v пре 6 година
родитељ
комит
071e095932
2 измењених фајлова са 4 додато и 0 уклоњено
  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} \