]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec and auth: implement stop command as alias for quit(-nicely) 15686/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 17 Jun 2025 08:24:52 +0000 (10:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 17 Jun 2025 08:24:52 +0000 (10:24 +0200)
Fixes #15674

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
docs/manpages/pdns_control.1.rst
pdns/dynloader.cc
pdns/recursordist/docs/manpages/pdns_recursor.1.rst
pdns/recursordist/rec_channel_rec.cc

index 17ce3a0b58680ff6d9caf95579075ba9c0c9998d..0ffc838b51d5e8396032d37567089bf0974fe05f 100644 (file)
@@ -120,8 +120,8 @@ qtypes
 
 Get a count of queries per qtype on standard output.
 
-quit
-^^^^
+quit or stop
+^^^^^^^^^^^^
 
 Tell a running pdns\_server to quit.
 
index 64619d473b6dda9406f31ea5a41978a63246ea1c..9f46e4c82a9057f8b8aa2642529334de87702eb9 100644 (file)
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
       message="SHOW *";
       command="show";
     }
-    else if(command=="quit" || command=="QUIT") {
+    else if(command=="quit" || command=="QUIT" || command == "stop" || command == "STOP") {
       message="QUIT";
     }
     else if(command=="status" || command=="STATUS") {
index d3665f695bd311641d304b69cab169790c2323fe..6212ba76a5e1c6a8062bb3d089b8a690f587426b 100644 (file)
@@ -25,7 +25,7 @@ as in the background, execute::
 
 To stop the recursor by hand, run::
 
-    # rec_control quit
+    # rec_control quit-nicely
 
 However, the recommended way of starting and stopping the recursor is to use
 :manpage:`systemctl(1)` or the init.d script.
index 293ae1dbca22c2154decb294c92ca58227c37a1f..78275caa9253209f66a68c6fcb1ea2101fa3648a 100644 (file)
@@ -1881,7 +1881,7 @@ static RecursorControlChannel::Answer help()
           "list-dnssec-algos                list supported DNSSEC algorithms\n"
           "ping                             check that all threads are alive\n"
           "quit                             stop the recursor daemon\n"
-          "quit-nicely                      stop the recursor daemon nicely\n"
+          "quit-nicely or stop              stop the recursor daemon nicely\n"
           "reload-acls                      reload ACLS\n"
           "reload-lua-script [filename]     (re)load Lua script\n"
           "reload-yaml                      Reload runtime settable parts of YAML settings\n"
@@ -2062,7 +2062,7 @@ RecursorControlChannel::Answer RecursorControlParser::getAnswer(int socket, cons
   if (cmd == "version") {
     return {0, getPDNSVersion() + "\n"};
   }
-  if (cmd == "quit-nicely") {
+  if (cmd == "quit-nicely" || cmd == "stop") {
     *command = &doExitNicely;
     return {0, "bye nicely\n"};
   }