This was lost with the conversion to the new settings.
::arg().set("server-id") = myHostname.has_value() ? *myHostname : "";
}
+ if (::arg()["socket-dir"].empty()) {
+ auto* runtimeDir = getenv("RUNTIME_DIRECTORY"); // NOLINT(concurrency-mt-unsafe,cppcoreguidelines-pro-type-vararg)
+ if (runtimeDir != nullptr) {
+ ::arg().set("socket-dir") = runtimeDir;
+ }
+ }
+
if (::arg()["socket-dir"].empty()) {
if (::arg()["chroot"].empty()) {
::arg().set("socket-dir") = std::string(LOCALSTATEDIR) + "/pdns-recursor";