I changed the systemd unit pdns@.service to ExecStart=/usr/sbin/pdns_server --socket-dir=%t/pdns-%i --config-dir=/etc/pdns/%i --config-name=%i --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no
Then pdns@INTERNO would read the startup configuration from /etc/pdns/INTERNO/pdns-INTERNO.conf, socket would be /run/pdns-INTERNO/pdns-INTERNO.controlsocket set aliases alias pdnsutil_INTERNO='pdnsutil --config-dir=/etc/pdns/INTERNO --config-name=INTERNO' alias pdns_control_INTERNO='pdns_control --socket-dir=/var/run/pdns-INTERNO --config-dir=/etc/pdns/INTERNO --config-name=INTERNO' I prefer to have all files of a pdns instance in a subdirectory instead of the softwares default to store all files in /etc/pdns and try to do instance prefixed config files. Am 21.01.22 um 02:49 schrieb Mark Moseley via Pdns-users:
On Thu, Jan 20, 2022 at 4:23 PM Mariano Absatz - el Baby via Pdns-users <pdns-users@mailman.powerdns.com <mailto:pdns-users@mailman.powerdns.com>> wrote: Hi, I'm using pdns 4.5.2 under Debian 11. I configured 2 virtual instances of pdns following the instructions in https://doc.powerdns.com/authoritative/guides/virtual-instances.html <https://doc.powerdns.com/authoritative/guides/virtual-instances.html> One is called "EXTERNO" and the other "INTERNO", with configurations in /etc/powerdns/pdns-EXTERNO.conf and /etc/powerdns/pdns-INTERNO.conf Now I'd like to try pdns_control on the same host. The problem I have is that the socket for the "EXTERNO" instance is /var/run/pdns-EXTERNO/pdns*-EXTERNO*.controlsocket and the socket for the "INTERNO" instance is /var/run/pdns-INTERNO/pdns*-INTERNO*.controlsocket However, if I try to use the pdns_control command, it only has a --socket-dir option, but no --socket-name option, and it assumes the socket name is /always/ pdns.controlsocket. I can't find either a socket-name (or equivalent) option for the configuration file. Here's an example: $ pdns_control --socket-dir=/var/run/pdns-EXTERNO current-config Fatal error: Unable to connect to remote '/var/run/pdns-EXTERNO/pdns.controlsocket': No such file or directory $ ls -l /var/run/pdns-EXTERNO total 0 srwxr-xr-x 1 pdns pdns 0 Jan 20 20:59 pdns-EXTERNO.controlsocket Try the --config-name option, i.e. --config-name=EXTERNO _______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users
_______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users