From 97e5b66544562b8d0daeb53599c154ec42aa7921 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 2 Oct 2023 17:10:43 +0200 Subject: [PATCH] wait for allowed-countries to be created Signed-off-by: Simon L --- start.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/start.sh b/start.sh index 6e8b741..8692530 100644 --- a/start.sh +++ b/start.sh @@ -14,6 +14,11 @@ set -x # Reset the file sed -i "/(GEOFILTER)/,$ d" /Cadddyfile +while ! [ -f /nextcloud/admin/files/nextcloud-aio-caddy/allowed-countries.txt ]; do + echo "Waiting for allowed-countries.txt file to be created" + sleep 5 +done + ALLOW_CONTRIES="$(head -n 1 filename /nextcloud/admin/files/nextcloud-aio-caddy/allowed-countries.txt)" if echo "$ALLOW_CONTRIES" | grep -q '^[A-Z ]\+$'; then FILTER_SET=1