Explorar o código

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

tomishinets.v %!s(int64=6) %!d(string=hai) anos
pai
achega
071e095932
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  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} \