From 9dd7578be693c4e75085f2414997422bc0531813 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Thu, 26 Jun 2025 13:03:02 -0400 Subject: [PATCH] Creating table at init level for postgresql --- support/crdb.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support/crdb.sh b/support/crdb.sh index 694486d..69cc58b 100755 --- a/support/crdb.sh +++ b/support/crdb.sh @@ -59,6 +59,7 @@ case "$DB_TYPE" in ;; "POSTGRESQL" ) SQL="/usr/bin/psql -q" + MSQL="/usr/bin/psql -U $APPNAME -q $APPNAME" /etc/rc.d/init.d/postgresql status if [ $? != 0 ] ; then echo "Postgresql serveur NOT found up and running (exiting!)" @@ -85,3 +86,7 @@ case "$DB_TYPE" in #undefined database type at that stage? ;; esac +#loading database definition +if [ -n "$MSQL" ] ; then + cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/$APPNAME.sql | $MSQL + fi -- 2.47.3