Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5870da6249 | |||
| 5bf84b3719 |
@@ -22,6 +22,10 @@ Install the database management system called postgresql with a predefined confi
|
|||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
# Restart services
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl reenable --now postgresql.service
|
||||||
|
|
||||||
# Create databases and users from DB_USERS variable (separator is ",") if not existing
|
# 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
|
for user in "${users[@]}"; do
|
||||||
@@ -31,14 +35,12 @@ for user in "${users[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Restart services
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl reenable --now postgresql.service
|
|
||||||
|
|
||||||
%files
|
%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/postgresql.conf
|
||||||
%attr(644, root, root) %{_sysconfdir}/postgres/pg_hba.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
|
%attr(644, root, root) %{_unitdir}/postgresql.service.d/postgres.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user