mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-16 04:33:33 +08:00
cmd: Eliminate unintended use of cgo
This means the stop command can only use the API to stop the instance; no more signaling, unless we find a cgo-free way of doing it.
This commit is contained in:
@ -134,13 +134,9 @@ not quit after printing, and can be useful for troubleshooting.`,
|
||||
Long: `
|
||||
Stops the background Caddy process as gracefully as possible.
|
||||
|
||||
It will first try to use the admin API's /stop endpoint; the address of
|
||||
this request can be customized using the --address flag if it is not the
|
||||
default.
|
||||
|
||||
If that fails for any reason, it will attempt to signal the first process
|
||||
it can find named the same as this one (os.Args[0]). On Windows, such
|
||||
a stop is forceful because Windows does not have signals.`,
|
||||
It requires that the admin API is enabled and accessible, since it will
|
||||
use the API's /stop endpoint. The address of this request can be
|
||||
customized using the --address flag if it is not the default.`,
|
||||
Flags: func() *flag.FlagSet {
|
||||
fs := flag.NewFlagSet("stop", flag.ExitOnError)
|
||||
fs.String("address", "", "The address to use to reach the admin API endpoint, if not the default")
|
||||
|
Reference in New Issue
Block a user