From 859c966c4607a031f7e9c88ba6e631a5a0b1ceef Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:25:50 +0100 Subject: [PATCH] Update 99-run.sh --- linkwarden/rootfs/etc/cont-init.d/99-run.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/linkwarden/rootfs/etc/cont-init.d/99-run.sh b/linkwarden/rootfs/etc/cont-init.d/99-run.sh index cf4294e3e..1b9ffa17c 100755 --- a/linkwarden/rootfs/etc/cont-init.d/99-run.sh +++ b/linkwarden/rootfs/etc/cont-init.d/99-run.sh @@ -15,4 +15,17 @@ npx prisma generate bashio::log.info "Starting app..." yarn prisma migrate deploy -yarn start docker-entrypoint.sh +yarn start docker-entrypoint.sh & true + +bashio::log.info "Starting postgres..." +mkdir -p /config/postgres +mkdir -p /var/run/postgresql +chown postgres:postgres /var/run/postgresql +chown -R postgres:postgres /config/postgres +chmod 0700 /config/postgres +if [ -e /config/postgres/postgresql.conf ]; then + echo "Database already configured" +else + postgres /usr/lib/postgresql/*/bin/initdb +fi +postgres /usr/lib/postgresql/*/bin/postgres -D /config/postgres/