mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-03 10:43:13 +08:00
Config auto-save; run --resume flag; update environ output (close #2903)
Config auto-saving is on by default and can be disabled. The --environ flag (or environ subcommand) now print more useful information from Caddy and the runtime, including some nifty paths.
This commit is contained in:
@ -116,11 +116,15 @@ line flags.
|
||||
|
||||
If --environ is specified, the environment as seen by the Caddy process will
|
||||
be printed before starting. This is the same as the environ command but does
|
||||
not quit after printing, and can be useful for troubleshooting.`,
|
||||
not quit after printing, and can be useful for troubleshooting.
|
||||
|
||||
The --resume flag will override the --config flag if there is a config auto-
|
||||
save file. It is not an error if --resume is used and no autosave file exists.`,
|
||||
Flags: func() *flag.FlagSet {
|
||||
fs := flag.NewFlagSet("run", flag.ExitOnError)
|
||||
fs.String("config", "", "Configuration file")
|
||||
fs.String("adapter", "", "Name of config adapter to apply")
|
||||
fs.Bool("resume", false, "Use saved config, if any (and prefer over --config file)")
|
||||
fs.Bool("environ", false, "Print environment")
|
||||
fs.String("pingback", "", "Echo confirmation bytes to this address on success")
|
||||
return fs
|
||||
|
Reference in New Issue
Block a user