From af174bc93042a9abcf021da8547e10aa74c87f28 Mon Sep 17 00:00:00 2001 From: Dennis Boldt Date: Sun, 2 Jan 2022 14:12:30 +0100 Subject: [PATCH] osm2pgsql can use a connection string See option -d at https://osm2pgsql.org/doc/man/latest.html --- osm2pgsql.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osm2pgsql.sh b/osm2pgsql.sh index 0ca1fa7..5e8c5ef 100755 --- a/osm2pgsql.sh +++ b/osm2pgsql.sh @@ -1,3 +1,4 @@ #!/bin/bash -echo $POSTGRES_PASSWORD | osm2pgsql --create --hstore --style tools/roads_import.lua -O flex -H $POSTGRES_HOST -d $POSTGRES_DB -U $POSTGRES_USER -W /pbf/*.osm.pbf +osm2pgsql --create --hstore --style tools/roads_import.lua -O flex -d postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB /pbf/*.osm.pbf +