summaryrefslogtreecommitdiffhomepage
path: root/tools/unitc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-10Tools: unitc YAML mode.Liam Crilly1-7/+51
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>
2023-10-03Tools: unitc quiet mode fix for macOS.Liam Crilly1-1/+1
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.
2023-06-07Tools: unitc edit mode for interactive configuration.Liam Crilly1-2/+26
2023-06-01Tools: improved ps(1) portability for unitc.Liam Crilly1-4/+19
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.
2023-05-24Updated copyright notice.Andrei Zeliankou1-1/+1
2023-04-04Tools: use control socket and log file from running instance.Liam Crilly1-2/+2
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.
2023-02-27Tools: improved detection of unitd control socket.Liam Crilly1-5/+5
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.
2022-12-19Tools: unitc avoid interactive rm(1) invocations.Liam Crilly1-3/+3
2022-12-14Tools: Added unitc.Liam Crilly1-0/+235