Skip to content

Commit

Permalink
wait for allowed-countries to be created
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <[email protected]>
  • Loading branch information
szaimen committed Oct 2, 2023
1 parent 3e740f2 commit 97e5b66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97e5b66

Please sign in to comment.