|
@ -74,7 +74,7 @@ func init() { |
|
|
RegisterCommand(Command{ |
|
|
RegisterCommand(Command{ |
|
|
Name: "start", |
|
|
Name: "start", |
|
|
Func: cmdStart, |
|
|
Func: cmdStart, |
|
|
Usage: "[--config <path> [--adapter <name>]] [--watch]", |
|
|
Usage: "[--config <path> [--adapter <name>]] [--watch] [--pidfile <file>]", |
|
|
Short: "Starts the Caddy process in the background and then returns", |
|
|
Short: "Starts the Caddy process in the background and then returns", |
|
|
Long: ` |
|
|
Long: ` |
|
|
Starts the Caddy process, optionally bootstrapped with an initial config file. |
|
|
Starts the Caddy process, optionally bootstrapped with an initial config file. |
|
@ -87,6 +87,7 @@ using 'caddy run' instead to keep it in the foreground.`, |
|
|
fs := flag.NewFlagSet("start", flag.ExitOnError) |
|
|
fs := flag.NewFlagSet("start", flag.ExitOnError) |
|
|
fs.String("config", "", "Configuration file") |
|
|
fs.String("config", "", "Configuration file") |
|
|
fs.String("adapter", "", "Name of config adapter to apply") |
|
|
fs.String("adapter", "", "Name of config adapter to apply") |
|
|
|
|
|
fs.String("pidfile", "", "Path of file to which to write process ID") |
|
|
fs.Bool("watch", false, "Reload changed config file automatically") |
|
|
fs.Bool("watch", false, "Reload changed config file automatically") |
|
|
return fs |
|
|
return fs |
|
|
}(), |
|
|
}(), |
|
@ -95,7 +96,7 @@ using 'caddy run' instead to keep it in the foreground.`, |
|
|
RegisterCommand(Command{ |
|
|
RegisterCommand(Command{ |
|
|
Name: "run", |
|
|
Name: "run", |
|
|
Func: cmdRun, |
|
|
Func: cmdRun, |
|
|
Usage: "[--config <path> [--adapter <name>]] [--environ] [--watch]", |
|
|
Usage: "[--config <path> [--adapter <name>]] [--environ] [--resume] [--watch] [--pidfile <fil>]", |
|
|
Short: `Starts the Caddy process and blocks indefinitely`, |
|
|
Short: `Starts the Caddy process and blocks indefinitely`, |
|
|
Long: ` |
|
|
Long: ` |
|
|
Starts the Caddy process, optionally bootstrapped with an initial config file, |
|
|
Starts the Caddy process, optionally bootstrapped with an initial config file, |
|
@ -132,6 +133,7 @@ development environment.`, |
|
|
fs.Bool("environ", false, "Print environment") |
|
|
fs.Bool("environ", false, "Print environment") |
|
|
fs.Bool("resume", false, "Use saved config, if any (and prefer over --config file)") |
|
|
fs.Bool("resume", false, "Use saved config, if any (and prefer over --config file)") |
|
|
fs.Bool("watch", false, "Watch config file for changes and reload it automatically") |
|
|
fs.Bool("watch", false, "Watch config file for changes and reload it automatically") |
|
|
|
|
|
fs.String("pidfile", "", "Path of file to which to write process ID") |
|
|
fs.String("pingback", "", "Echo confirmation bytes to this address on success") |
|
|
fs.String("pingback", "", "Echo confirmation bytes to this address on success") |
|
|
return fs |
|
|
return fs |
|
|
}(), |
|
|
}(), |
|
|