Compare commits
4 Commits
94e6f55e4d
...
v0.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bf84b3719 | |||
| c55e4199e8 | |||
| fde6b4b621 | |||
| 98dbfe8da5 |
@@ -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:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Change pg_hba location
|
||||
hba_file = "/etc/postgres/pg_hba.conf"
|
||||
hba_file = '/etc/postgres/pg_hba.conf'
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -16,7 +16,7 @@ hba_file = "/etc/postgres/pg_hba.conf"
|
||||
|
||||
# Empty listen addresses to disable listening via TCP/IP
|
||||
# because we want only uni socket connections
|
||||
listen_addresses = ""
|
||||
listen_addresses = ''
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -26,4 +26,4 @@ listen_addresses = ""
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Redirect logs to stderr to be managed by journald
|
||||
log_destination = "stderr"
|
||||
log_destination = 'stderr'
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/postgres -D ${PGDATA} -c config_file=/etc/postgres/postgresql.conf
|
||||
|
||||
@@ -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"
|
||||
@@ -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