From c4e8ba8e26fbcf94faf1c5814eb72ba6d8266535 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 27 May 2020 09:38:22 +0200 Subject: [PATCH] Fix: Prevent breaking on container restart Signed-off-by: Knut Ahlers --- setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.sh b/setup.sh index ac8e852..4ae5a5f 100644 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,11 @@ #!/usr/bin/with-contenv /bin/bash set -euxo pipefail +[ -e /etc/jitsi/.configured ] && { + echo "Configuration was already applied, not re-applying" + exit 0 +} + cfg_file_path="/usr/local/share/jitsi-config" [ -n "${JITSI_DOMAIN:-}" ] || { @@ -52,3 +57,8 @@ prosodyctl register focus "auth.${JITSI_DOMAIN}" "${JITSI_ADMIN_SECRET}" popd } + +# Mark container as initialized not to overwrite config +# which would break the container as passwords would be +# re-issued +touch /etc/jitsi/.configured