fix: add drop-in directory in spec file

This commit is contained in:
2026-02-22 22:33:41 +01:00
parent c55e4199e8
commit 5bfc1ca929

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
IFS="," read -ra users <<<"$DB_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"
@@ -36,9 +36,11 @@ systemctl daemon-reload
systemctl reenable --now postgresql.service
%files
%attr(755, root, root) %{_sysconfdir}/postgres
%dir %attr(755, root, root) %{_sysconfdir}/postgres
%attr(644, root, root) %{_sysconfdir}/postgres/postgresql.conf
%attr(644, root, root) %{_sysconfdir}/postgres/pg_hba.conf
%dir %attr(755, root, root) %{_unitdir}/postgresql.service.d
%attr(644, root, root) %{_unitdir}/postgresql.service.d/postgres.conf
%changelog