summaryrefslogtreecommitdiff
path: root/cmd/commands.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-31 16:56:19 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-31 16:56:19 -0700
commit5a0603ed72cead424a34b3bc5af3a5b1629ac187 (patch)
tree03fa4f722d2b5b79986d14cfeeac9294cafc08e7 /cmd/commands.go
parent984d384d148090cdb0f6aa2f234a8b946c3b9ee3 (diff)
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.
Diffstat (limited to 'cmd/commands.go')
-rw-r--r--cmd/commands.go6
1 files changed, 5 insertions, 1 deletions
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