From 64d47b4440b70656c64bf8c6c51f4c461db441d6 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 4 Mar 2026 07:33:50 +0100 Subject: [PATCH] fix(powerdns): use gsqlite3 backend instead of BIND (#12533) - Comment out empty 'launch=' in pdns.conf that overrides launch+= directives - Remove default bind.conf and create gsqlite3.conf pointing to the Poweradmin SQLite database (/opt/poweradmin/powerdns.db) - Set correct ownership (pdns:pdns) and permissions (664) on the database file so pdns_server can read/write it - Add www-data to pdns group for shared database access - Restart pdns service alongside apache2 --- install/powerdns-install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install/powerdns-install.sh b/install/powerdns-install.sh index 1f7004c72..6c388b7b0 100644 --- a/install/powerdns-install.sh +++ b/install/powerdns-install.sh @@ -38,6 +38,12 @@ msg_info "Setting up PowerDNS" $STD apt install -y \ pdns-server \ pdns-backend-sqlite3 +sed -i 's/^launch=$/# launch=/' /etc/powerdns/pdns.conf +rm -f /etc/powerdns/pdns.d/bind.conf +cat </etc/powerdns/pdns.d/gsqlite3.conf +launch+=gsqlite3 +gsqlite3-database=/opt/poweradmin/powerdns.db +EOF msg_ok "Setup PowerDNS" fetch_and_deploy_gh_release "poweradmin" "poweradmin/poweradmin" "tarball" @@ -126,7 +132,10 @@ cat </etc/apache2/sites-enabled/poweradmin.conf EOF $STD a2enmod rewrite headers chown -R www-data:www-data /opt/poweradmin -$STD systemctl restart apache2 +chown pdns:pdns /opt/poweradmin/powerdns.db +chmod 664 /opt/poweradmin/powerdns.db +usermod -aG pdns www-data +$STD systemctl restart pdns apache2 msg_info "Created Service" motd_ssh