fix: add drop-in directory in spec file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user