From: Michael Wagner Date: Mon, 18 Jan 2021 19:08:49 +0000 (+0100) Subject: epic-ts X-Git-Tag: kivitendo_3.5.6.1-0~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=75279078c6935bb53fc72d66239081912f56719c;p=kivitendo-erp.git epic-ts --- diff --git a/debian/kivitendo.postinst b/debian/kivitendo.postinst index 1999d3049..4f9364a42 100755 --- a/debian/kivitendo.postinst +++ b/debian/kivitendo.postinst @@ -12,14 +12,15 @@ then fi # test DB login -if ! echo "\q" | psql kivitendo_auth kivitendo +if ! su postgres -c "psql -c '\du'" | grep kivitendo >/dev/null then - # create kivitendo user + echo "No user named 'kivitendo' found. It is now created. Use the same password!" su postgres -c "createuser -dPs kivitendo" fi -if ! grep kivitendo /etc/postgresql/*/main/pg_hba.conf >/dev/null +main=$(ls -d /etc/postgresql/*/main/) +if ! grep kivitendo $main/pg_hba.conf >/dev/null then - echo "local all kivitendo md5" >> /etc/postgresql/*/main/pg_hba.conf + echo "local all kivitendo md5" >> $main/pg_hba.conf systemctl reload postgresql fi