Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
head -c 0 does not work on macOS (invalid byte count) but tail(1) is happy
to accept zero bytes, and does not have a performance penalty.
|
|
|
|
Improved cross-platform support by trying multiple ps(1) invocations to
obtain the unitd command line parameters. Additional error checking
detects when this process fails.
The first attempt uses `ps -wwo args=COMMAND -p` which has very broad
support and has the additional benefit of simplifying the output for
more reliable parsing of the process info. If that fails then we fall
back to simply `ps`.
The parsing of the process info has also changed. Instead of converting
'[]' into spaces we now convert them into explicit delimiters (using '^').
This is more reliable as it marks the beginning and the end of the info
we care about. Any trailing process information is now ignored (FreeBSD).
Additional error handling improves the robustness when starting unitd with
a different filename or from a relative path. In this case the control
socket and log file detection will fail when running `unitd --help`.
Additional error checking and messages are displayed when the control socket
cannot be determined. A single warning is shown when the log file cannot be
determined.
|
|
|
|
If unitd was started with an explicit path then unitc will use that
binary instead of the default PATH to obtain the default control socket
and log file locations.
|
|
Now unitc obtains the path to the unitd binary from information
contained in the unitd: main process. If unitd was started with an
explicit path then that path will be used to obtain the default
control socket, instead of using the unitd binary in $PATH.
|
|
|
|
|