Ver código fonte

Skip ACME client for other certificates than LE

andryyy 8 anos atrás
pai
commit
5aba885b58
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      data/Dockerfiles/acme/docker-entrypoint.sh

+ 6 - 0
data/Dockerfiles/acme/docker-entrypoint.sh

@@ -11,6 +11,12 @@ restart_containers(){
 	done
 }
 
+if [[ $(openssl x509 -in ${ACME_BASE}/cert.pem -noout -issuer) != *"Let's Encrypt"* &&
+      $(openssl x509 -in ${ACME_BASE}/cert.pem -noout -issuer) != *"mailcow"* ]]; then
+	echo "Skipping ACME client"
+	exit 0
+fi
+
 while true; do
 
 	declare -a SQL_DOMAIN_ARR