From 0569f78ca1e3fa949a9cecc07925142f13a78c48 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:52:57 +0100 Subject: [PATCH] Update 99-run.sh --- linkwarden/rootfs/etc/cont-init.d/99-run.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linkwarden/rootfs/etc/cont-init.d/99-run.sh b/linkwarden/rootfs/etc/cont-init.d/99-run.sh index 1e08463fc..37b040ca0 100755 --- a/linkwarden/rootfs/etc/cont-init.d/99-run.sh +++ b/linkwarden/rootfs/etc/cont-init.d/99-run.sh @@ -39,8 +39,7 @@ if [[ "$DATABASE_URL" == *"localhost"* ]]; then sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'homeassistant';" # Create database if does not exist - echo "CREATE ROLE postgres WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD 'homeassistant'; - CREATE DATABASE linkwarden; CREATE USER postgres WITH ENCRYPTED PASSWORD 'homeassistant'; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres; + echo "CREATE DATABASE linkwarden; GRANT ALL PRIVILEGES ON DATABASE linkwarden to postgres; \q"> setup_postgres.sql sudo -u postgres psql "postgres://postgres:homeassistant@localhost:5432" < setup_postgres.sql || true fi