]> granicus.if.org Git - pdns/commitdiff
Edit configname to include the 'config-name' argument
authorJake Reynolds <jakealexis@gmail.com>
Wed, 15 Nov 2017 14:59:43 +0000 (14:59 +0000)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 21 Nov 2017 10:27:29 +0000 (11:27 +0100)
(cherry picked from commit 3e63da83fde2d98ed0739578f7171aa4e70a6f32)

pdns/pdns_recursor.cc
pdns/reczones.cc

index 4efc81e486900f28c492d55f906ba1527c27390b..8ca5c8970489ea78e711fc32699fcecda5ab284b 100644 (file)
@@ -2511,6 +2511,9 @@ void parseACLs()
 
   if(l_initialized) { // only reload configuration file on second call
     string configname=::arg()["config-dir"]+"/recursor.conf";
+    if(::arg()["config-name"]!="") {
+      configname=::arg()["config-dir"]+"/recursor-"+::arg()["config-name"]+".conf";
+    }
     cleanSlashes(configname);
 
     if(!::arg().preParseFile(configname.c_str(), "allow-from-file"))
index be47bb6075da5c178c3a425d0484a65c4aca4512..b6deb8f88692f428b5e3e54120146a5201fbf06c 100644 (file)
@@ -254,6 +254,9 @@ string reloadAuthAndForwards()
     }
 
     string configname=::arg()["config-dir"]+"/recursor.conf";
+    if(::arg()["config-name"]!="") {
+      configname=::arg()["config-dir"]+"/recursor-"+::arg()["config-name"]+".conf";
+    }
     cleanSlashes(configname);
     
     if(!::arg().preParseFile(configname.c_str(), "forward-zones"))