From 2f8890ee03b462305cf81af64970859f97aad320 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 10 Dec 2018 15:46:53 +0100 Subject: [PATCH] new: [letsencrypt] do not require admin email anymore. --- letsencrypt/hooks/dc-pre-run | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/letsencrypt/hooks/dc-pre-run b/letsencrypt/hooks/dc-pre-run index 036c2c2..2af5330 100755 --- a/letsencrypt/hooks/dc-pre-run +++ b/letsencrypt/hooks/dc-pre-run @@ -17,15 +17,13 @@ set -e service_def=$(get_compose_service_def "$SERVICE_NAME") -USER_EMAIL=$(echo "$service_def" | shyaml get-value options.email 2>/dev/null) || { - err "No ${WHITE}email${NORMAL} value in ${DARKYELLOW}$SERVICE_NAME${NORMAL} compose's ${WHITE}options${NORMAL}." - exit 1 -} - config=" $SERVICE_NAME: environment: - LETSENCRYPT_USER_MAIL: $USER_EMAIL" +" +if USER_EMAIL=$(echo "$service_def" | shyaml get-value options.email 2>/dev/null); then + config+=" LETSENCRYPT_USER_MAIL: $USER_EMAIL" +fi if environment_def="$(printf "%s" "$service_def" | shyaml -y get-value options.env 2>/dev/null)"; then while read-0 key value; do