From 5a0603ed72cead424a34b3bc5af3a5b1629ac187 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 31 Dec 2019 16:56:19 -0700 Subject: 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. --- cmd/commands.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/commands.go') diff --git a/cmd/commands.go b/cmd/commands.go index 971d8d9..93ebeff 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -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 -- cgit v1.2.3