From 0ac3e884e46d8c27b4c0cd52c2138c969ab9c617 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 1 Oct 2022 19:01:12 +0200 Subject: [PATCH] postgresql client for debian --- seed/postgresql-client/dictionaries/23_postgresql.xml | 5 +++++ .../manual/image/preinstall/postgresql_client.sh | 6 +++++- .../templates/sysuser-postgresql-client.conf | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 seed/postgresql-client/templates/sysuser-postgresql-client.conf diff --git a/seed/postgresql-client/dictionaries/23_postgresql.xml b/seed/postgresql-client/dictionaries/23_postgresql.xml index 9afde856..58dfcb60 100644 --- a/seed/postgresql-client/dictionaries/23_postgresql.xml +++ b/seed/postgresql-client/dictionaries/23_postgresql.xml @@ -6,6 +6,7 @@ /etc/pki/ca-trust/source/anchors/ca_PostgreSQL.crt /etc/pki/tls/certs/postgresql.crt /etc/pki/tls/private/postgresql.key + /sysusers.d/0postgresqlclient.conf @@ -41,5 +42,9 @@ pg_client_username pg_client_database + + Debian + postgresql_debian + diff --git a/seed/postgresql-client/manual/image/preinstall/postgresql_client.sh b/seed/postgresql-client/manual/image/preinstall/postgresql_client.sh index f5d15a18..1072cd97 100644 --- a/seed/postgresql-client/manual/image/preinstall/postgresql_client.sh +++ b/seed/postgresql-client/manual/image/preinstall/postgresql_client.sh @@ -1 +1,5 @@ -PKG="$PKG postgresql" +if [ "$INSTALL_TOOL" = "dnf" ]; then + PKG="$PKG postgresql" +else + PKG="$PKG postgresql-client" +fi diff --git a/seed/postgresql-client/templates/sysuser-postgresql-client.conf b/seed/postgresql-client/templates/sysuser-postgresql-client.conf new file mode 100644 index 00000000..8d93c427 --- /dev/null +++ b/seed/postgresql-client/templates/sysuser-postgresql-client.conf @@ -0,0 +1,4 @@ +g ssl-cert 108 +g postgres 109 +u postgres 104:109 "PostgreSQL administrator" /var/lib/postgresql /bin/bash +m postgres ssl-cert