fix ssl issue psql 17
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled

This commit is contained in:
CanbiZ 2025-10-20 11:16:14 +02:00
parent 5ad3e3043b
commit aea08ee1ce
2 changed files with 6 additions and 1 deletions

View File

@ -27,7 +27,7 @@ msg_ok "Installed Dependencies"
setup_uv
NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql
PG_VERSION="16" setup_postgresql
msg_info "Creating PostgreSQL Database"
DB_NAME=dispatcharr_db

View File

@ -2727,6 +2727,11 @@ function setup_postgresql() {
# Try multiple PostgreSQL package patterns
local pg_install_success=false
# First, ensure ssl-cert is available (PostgreSQL dependency)
if apt-cache search "^ssl-cert$" 2>/dev/null | grep -q .; then
$STD apt install -y ssl-cert 2>/dev/null || true
fi
# First try: postgresql-X (common in most repos)
if apt-cache search "^postgresql-${PG_VERSION}$" 2>/dev/null | grep -q . && $STD apt install -y "postgresql-${PG_VERSION}" "postgresql-client-${PG_VERSION}" 2>/dev/null; then
pg_install_success=true