2 Commits

Author SHA1 Message Date
fde6b4b621 fix: override execstart
Some checks failed
Continuous Delivery / build_n_upload (push) Has been cancelled
2026-02-22 21:58:30 +01:00
98dbfe8da5 feat: add db users
Some checks failed
Continuous Delivery / build_n_upload (push) Has been cancelled
2026-02-22 16:24:16 +01:00
3 changed files with 4 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ jobs:
env:
GIT_REFERENCE: ${{ github.ref }}
- name: Build rpm package
run: rpmbuild -ba "%(make name).spec"
run: rpmbuild -ba "$(make name).spec"
- name: Upload rpm package
run: make upload
env:

View File

@@ -1,2 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/postgres -D ${PGDATA} -c config_file=/etc/postgres/postgresql.conf

View File

@@ -23,7 +23,7 @@ Install the database management system called postgresql with a predefined confi
%post
# Create databases and users from DB_USERS variable (separator is ",") if not existing
echo "$DB_USERS" | IFS="," read -ra users
IFS="," read -ra users <<<"$DB_USERS";
for user in "${users[@]}"; do
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --invert-match postgres | grep --quiet "$user"; then
runuser --user=postgres -- createuser "$user"