From ab9f9e0a4c3cb2cd85d11f98b4798d0fe4c889d9 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Mon, 14 Jun 2021 09:02:16 +0200 Subject: [PATCH] jobs - fix jobs when MULTISITE=yes --- entrypoint/jobs.sh | 6 +++--- entrypoint/utils.sh | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/entrypoint/jobs.sh b/entrypoint/jobs.sh index e34e470..f110a70 100644 --- a/entrypoint/jobs.sh +++ b/entrypoint/jobs.sh @@ -5,7 +5,7 @@ # self signed certs for sites files=$(has_value GENERATE_SELF_SIGNED_SSL yes) -if [ "$files" != " " ] ; then +if [ "$files" != "" ] ; then for file in $files ; do site=$(echo $file | cut -f 4 -d '/') dest="/etc/nginx/" @@ -47,7 +47,7 @@ fi # certbot files=$(has_value AUTO_LETS_ENCRYPT yes) -if [ "$files" != " " ] ; then +if [ "$files" != "" ] ; then for file in $files ; do if [ "$(echo "$file" | grep 'site.env$')" = "" ] ; then continue @@ -60,7 +60,7 @@ if [ "$files" != " " ] ; then fi certbot_outpout=$(/opt/scripts/certbot-new.sh "$(echo -n $SERVER_NAME | sed 's/ /,/g')" "$EMAIL_LETS_ENCRYPT" 2>&1) if [ $? -eq 0 ] ; then - echo "[*] Certbot new successfully executed" + echo "[*] Certbot new successfully executed for domain(s) $(echo -n $SERVER_NAME | sed 's/ /,/g')" else echo "[*] Error while executing certbot new : $certbot_output" fi diff --git a/entrypoint/utils.sh b/entrypoint/utils.sh index 88d695d..c31f2f4 100644 --- a/entrypoint/utils.sh +++ b/entrypoint/utils.sh @@ -28,7 +28,6 @@ function has_value() { for file in $envs ; do if [ "$(grep "^${1}=${2}$" $file)" != "" ] ; then echo "$file" - return 0 fi done }