From afd6778ca62816bc841d94b6833f01910802eabf Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 23 Jan 2023 13:18:25 +0100 Subject: [PATCH] do not fail if importing for existing datbase --- run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 0b2abe6..de65463 100755 --- a/run.sh +++ b/run.sh @@ -40,7 +40,12 @@ if [ ! -f /data/style/mapnik.xml ]; then carto ${NAME_MML:-project.mml} > mapnik.xml fi -if [ "$1" == "import" ] && [ ! -f /var/lib/postgresql/14/main/.databaseImported ]; then +if [ "$1" == "import" ]; then + if [ ! -f /var/lib/postgresql/14/main/.databaseImported ]; then + echo "database already initialized" + exit 0 + fi + # Ensure that database directory is in right state mkdir -p /data/database/postgres/ chown renderer: /data/database/