pdns_control quit does not wait for the server to terminate. This results in `start` failing because the old one is still running. Jan 3 23:29:27 hydra pdns[9831]: Scheduling exit on remote request Jan 3 23:29:27 hydra pdns[9893]: Previous controlsocket '/var/run/pdns.controlsocket' is in use Jan 3 23:29:27 hydra pdns[9831]: Guardian is killed, taking down children with us Afterwards, I can only start it again after zapping it. A `sleep 1` at the end of the stop() command solved this for me, but manually editing the init script is not very clean IMO... restart() cannot be overridden but maybe there's a better workaround than slowing down all stops even if there's not restart (OTOH, waiting for the server to terminate when stopping sounds like a good thing)
I can confirm the problem. In the past I created a new runscript for pdns, see https://github.com/Whissi/gentoo-overlay/blob/master/net-dns/pdns/files/pdns.initd
I've updated the ebuild to 4.0.3-r2 which uses an updated init script, that employs a timeout on stop and fails the stop command if the daemon doesn't stop properly.