From a94ce67c223827c0775f3d8177680d4537fbbcc1 Mon Sep 17 00:00:00 2001 From: Manfred Date: Fri, 2 Oct 2020 07:40:04 +0200 Subject: [PATCH] Update saml-setup.sh (#5580) * Update saml-setup.sh create symbolic link fails when container is restarted --- server/docker/saml-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/docker/saml-setup.sh b/server/docker/saml-setup.sh index ec98ea461..9af9641a3 100644 --- a/server/docker/saml-setup.sh +++ b/server/docker/saml-setup.sh @@ -4,7 +4,7 @@ if [[ "$ENABLE_SAML" = True ]]; then for i in /run/secrets/saml_{cert,key,config}; do [[ -f "$i" ]] || { echo "ERROR: $i not found!"; exit 3; } done - ln -s /run/secrets/saml_cert /app/personal_data/var/certs/sp.crt - ln -s /run/secrets/saml_key /app/personal_data/var/certs/sp.key - ln -s /run/secrets/saml_config /app/personal_data/var/saml_settings.json + test -L /app/personal_data/var/certs/sp.crt || { ln -s /run/secrets/saml_cert /app/personal_data/var/certs/sp.crt; } + test -L /app/personal_data/var/certs/sp.key || { ln -s /run/secrets/saml_key /app/personal_data/var/certs/sp.key; } + test -L /app/personal_data/var/saml_settings.json || { ln -s /run/secrets/saml_config /app/personal_data/var/saml_settings.json; } fi