ci: improve workflows
Some checks failed
Continuous Integration / lint_n_build (push) Has been cancelled

This commit is contained in:
2026-03-08 22:41:09 +01:00
parent 6e7800721f
commit 5c2a5d0710
5 changed files with 150 additions and 53 deletions

View File

@@ -3,12 +3,12 @@
Name: %(make name)
Version: %(make version)
Release: %(make release)
Summary: Netoik Reverse Proxy
License: MIT
URL: https://git.netoik.io/samuel/%(make name)
Summary: %(make summary)
License: %(make license)
URL: %(make url)
Source0: %{name}-%{version}.tar.gz
Buildarch: %(make build_arch)
Source0: %(make source0)
Buildarch: %(make arch)
BuildRequires: make
Requires: postgresql-server postgresql
@@ -31,16 +31,6 @@ systemctl daemon-reload
systemctl reenable postgresql.service
systemctl restart postgresql.service
# Create databases and users from DB_USERS variable (separator is ",") if not existing
IFS="," read -ra users <<< "$DB_USERS";
for user in "${users[@]}"; do
usermod --append --groups postgres "$user";
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet "$user"; then
runuser --user=postgres -- createuser "$user"
runuser --user=postgres -- createdb --owner="$user" "$user"
fi
done
%files
%dir %attr(755, root, root) %{_sysconfdir}/postgres
%attr(644, root, root) %{_sysconfdir}/postgres/postgresql.conf