Update PostgreSQL module to run as normal user with sudo for PostgreSQL

also clean up all PostgreSQL command calls as array type calls
clean up binary finder for postgresql installations
and add port/host override options
This commit is contained in:
Clemens Schwaighofer
2025-12-04 09:28:57 +09:00
parent 32a75626bb
commit 1b52af909a
3 changed files with 155 additions and 58 deletions

View File

@@ -9,5 +9,15 @@
# note that with this databases that have been dropped need to be pruned manually
# if 'schema' word is used, only schema data is dumped
DATABASE_FULL_DUMP="";
# override default postgres user
# override default postgres user and sudo user for all postgres commands
# All commands must be run as the postgres admin user
DATABASE_USER="";
# disable sudo usage by setting to "0", default is to use sudo
DATABASE_USE_SUDO="";
# set the sudo user, if not set postgres or DATABASE_USER is used
DATABASE_SUDO_USER="";
# override port
DATABASE_PORT="";
# override database host, if set to local, localhost or 127.0.0.1 it will use sockets to connect
# for socket connection ident or sudo has to be used
DATABASE_HOST="";