mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-10 11:09:12 +01:00
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
This commit is contained in:
@@ -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 <<EOF >/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 <<EOF >/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
|
||||
|
||||
Reference in New Issue
Block a user