From c105581f7e1f62c53abf5a0eb9b7e1709992785e Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Tue, 23 Jul 2019 17:17:07 -0600 Subject: [PATCH] Update /stop documentation --- v2:-Documentation.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v2:-Documentation.md b/v2:-Documentation.md index 411d45e..8c41670 100644 --- a/v2:-Documentation.md +++ b/v2:-Documentation.md @@ -14,6 +14,7 @@ Features which are available in Caddy Enterprise are indicated with   🏢 - [environ](#environ) - [Admin endpoint](#admin-endpoint) - [POST /load](#post-load) + - [POST /stop](#post-stop) - [GET /config/[scope]](#get-configscope) - [POST /config/[scope]](#post-configscope) - [PUT /config/[scope]](#put-configscope) @@ -102,7 +103,7 @@ Same as `start`, but blocks indefinitely; i.e. runs Caddy in "daemon" mode. On W $ caddy stop ``` -Gracefully stops the running Caddy process. (Note: this will stop any process named the same as the executable file.) On Windows, this stop is forceful and Caddy will not have an opportunity to do a graceful shutdown and clean up any active locks. A graceful shutdown can be performed by POSTing to /stop endpoint [soon to be implemented](https://github.com/caddyserver/caddy/pull/2671). +Gracefully stops the running Caddy process. (Note: this will stop any process named the same as the executable.) On Windows, this stop is forceful and Caddy will not have an opportunity to clean up any active locks; for a graceful shutdown on Windows, use Ctrl+C or the [/stop endpoint](#post-stop). ## reload @@ -160,6 +161,16 @@ $ curl -X POST "http://localhost:2019/load" \ -d @caddy.json ``` +## POST /stop + +Gracefully shuts down the server. + +### Example + +```bash +$ curl -X POST "http://localhost:2019/stop" +``` + ## GET /config/[scope] 🏢 _Enterprise_