summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiam Crilly <liam.crilly@nginx.com>2023-11-08 09:33:38 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-02-19 13:00:26 +0000
commit1dca86028a1306655f513512f353a38e10b75d85 (patch)
treed248bc12c10a68dc915241853ca7a6dc066d188c
parent2bd3b41876151488b123ea8f5fe6195b97bdd9ce (diff)
downloadunit-1dca86028a1306655f513512f353a38e10b75d85.tar.gz
unit-1dca86028a1306655f513512f353a38e10b75d85.tar.bz2
Tools: disambiguate unitc control socket detection
Now that unitd has multiple --control* startup options, locating the address of the control socket requires additional precision. Signed-off-by: Liam Crilly <liam.crilly@nginx.com> Acked-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rwxr-xr-xtools/unitc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/unitc b/tools/unitc
index 22417266..9b3557c5 100755
--- a/tools/unitc
+++ b/tools/unitc
@@ -186,9 +186,9 @@ if [ $REMOTE -eq 0 ]; then
echo "${0##*/}: WARNING: unable to identify unitd command line parameters for PID $PID, assuming unitd defaults from \$PATH"
PARAMS=unitd
fi
- CTRL_ADDR=$(echo "$PARAMS" | grep '\--control' | cut -f2 -d' ')
+ CTRL_ADDR=$(echo "$PARAMS" | grep '\--control ' | cut -f2 -d' ')
if [ "$CTRL_ADDR" = "" ]; then
- CTRL_ADDR=$($(echo "$PARAMS") --help | grep -A1 '\--control' | tail -1 | cut -f2 -d\")
+ CTRL_ADDR=$($(echo "$PARAMS") --help | grep -A1 '\--control ADDRESS' | tail -1 | cut -f2 -d\")
fi
if [ "$CTRL_ADDR" = "" ]; then
echo "${0##*/}: ERROR: cannot detect control socket. Did you start unitd with a relative path? Try starting unitd with --control option."