Improve locale setup and database user privileges

Add command to grant superuser, createrole, and createdb privileges to the postgres user during Databasus installation. Enhance LXC container customization by installing locales for Devuan templates and only configuring locale if locale.gen exists, improving compatibility with minimal templates.
This commit is contained in:
CanbiZ (MickLesk)
2026-01-30 09:47:38 +01:00
parent 036c17647e
commit dc5c1d3ef0
2 changed files with 15 additions and 16 deletions

View File

@@ -113,6 +113,7 @@ if ! grep -q "databasus" "$PG_HBA"; then
systemctl reload postgresql
fi
$STD sudo -u postgres psql -c "CREATE DATABASE databasus;" 2>/dev/null || true
$STD sudo -u postgres psql -c "ALTER USER postgres WITH SUPERUSER CREATEROLE CREATEDB;" 2>/dev/null || true
msg_ok "Created Database"
msg_info "Creating Databasus Service"