diff options
author | Liam Crilly <liam.crilly@nginx.com> | 2023-10-10 15:06:36 +0100 |
---|---|---|
committer | Liam Crilly <liam.crilly@nginx.com> | 2023-10-10 15:06:36 +0100 |
commit | 599b035a544ea27e9fe76cb79f7d672ef114c2d2 (patch) | |
tree | e1ce0b44c10ef26e88f1c938456c77c1fa7baeed /tools/README.md | |
parent | 9c8b9a46a42d47b29453eefc4c5dd325f59e46b4 (diff) | |
download | unit-599b035a544ea27e9fe76cb79f7d672ef114c2d2.tar.gz unit-599b035a544ea27e9fe76cb79f7d672ef114c2d2.tar.bz2 |
Tools: unitc YAML mode.
Added --format option to manage configuration in other formats.
Initially, YAML is the only supported conversion format.
JSON/YAML conversion is performed with yq(1).
Suggested by: Torstein Krause Johansen <https://github.com/skybert>
Closes: #958 <https://github.com/nginx/unit/issues/958>
Diffstat (limited to 'tools/README.md')
-rw-r--r-- | tools/README.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/README.md b/tools/README.md index 1a631e10..0bb80985 100644 --- a/tools/README.md +++ b/tools/README.md @@ -37,12 +37,16 @@ web page with NGINX Unit. | _HTTP method_ | It is usually not required to specify a HTTP method. `GET` is used to read the configuration. `PUT` is used when making configuration changes unless a specific method is provided. | `edit` | Opens **URI** in the default editor for interactive configuration. The [jq](https://stedolan.github.io/jq/) tool is required for this option. | `INSERT` | A _virtual_ HTTP method that prepends data when the URI specifies an existing array. The [jq](https://stedolan.github.io/jq/) tool is required for this option. +| `-f` \| `--format YAML` | Convert configuration data to/from YAML format. The [yq](https://github.com/mikefarah/yq) tool is required for this option. | `-q` \| `--quiet` | No output to stdout. Options are case insensitive and can appear in any order. For example, a redundant part of the configuration can be identified by its URI, and followed by `delete` in a subsequent command. +Options may be combined. For example, `edit -f yaml` will open the +configuration URI in a text editor, in YAML format. + ### Local Configuration For local instances of Unit, the control socket is automatically detected. The error log is monitored; when changes occur, new log entries are shown. |