docs: --pidfile flag

This commit is contained in:
Matthew Holt 2020-05-14 10:19:14 -06:00 committed by Francis Lavoie
parent fa3b5f6699
commit f655da2c2e
No known key found for this signature in database
GPG key ID: 7D1A27F0725BE5D8

View file

@ -250,6 +250,7 @@ This command disables the admin API so it is easier to run multiple instances on
<pre><code class="cmd bash">caddy run
[--config &lt;path&gt;]
[--adapter &lt;name&gt;]
[--pidfile &lt;file&gt;]
[--environ]
[--resume]
[--watch]</code></pre>
@ -260,6 +261,8 @@ Runs Caddy and blocks indefinitely; i.e. "daemon" mode.
`--adapter` is the name of the config adapter to use when loading the initial config, if any. This flag is not necessary if the `--config` filename starts with "Caddyfile" which assumes the `caddyfile` adapter. Otherwise, this flag is required if the provided config file is not in Caddy's native JSON format. Any warnings will be printed to the log, but beware that any adaptation without errors will immediately be used, even if there are warnings. If you want to review the results of the adaptation first, use the [`caddy adapt`](#caddy-adapt) subcommand.
`--pidfile` writes the PID to the specified file.
`--environ` prints out the environment before starting. This is the same as the `caddy environ` command, but does not exit after printing.
`--resume` uses the last loaded configuration, overriding the `--config` flag (if present) if a previous config was saved. Using this flag guarantees config durability through machine reboots or process restarts. It is most useful in [API](/docs/api)-heavy deployments.
@ -277,6 +280,7 @@ Runs Caddy and blocks indefinitely; i.e. "daemon" mode.
<pre><code class="cmd bash">caddy start
[--config &lt;path&gt;]
[--adapter &lt;name&gt;]
[--pidfile &lt;file&gt;]
[--watch]</code></code></pre>
Same as [`caddy run`](#caddy-run), but in the background. This command only blocks until the background process is running successfully (or fails to run), then returns.