projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc2a8f7
)
epic-ts
author
Michael Wagner
<michael@wagnertech.de>
Mon, 18 Jan 2021 19:08:49 +0000
(20:08 +0100)
committer
Michael Wagner
<michael@wagnertech.de>
Mon, 18 Jan 2021 19:08:49 +0000
(20:08 +0100)
debian/kivitendo.postinst
patch
|
blob
|
history
diff --git
a/debian/kivitendo.postinst
b/debian/kivitendo.postinst
index
1999d30
..
4f9364a
100755
(executable)
--- a/
debian/kivitendo.postinst
+++ b/
debian/kivitendo.postinst
@@
-12,14
+12,15
@@
then
fi
# test DB login
fi
# test DB login
-if !
echo "\q" | psql kivitendo_auth kivitendo
+if !
su postgres -c "psql -c '\du'" | grep kivitendo >/dev/null
then
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
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
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
systemctl reload postgresql
fi