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>
This commit is contained in:
committed by
Andrew Clayton
parent
2bd3b41876
commit
1dca86028a
@@ -188,7 +188,7 @@ if [ $REMOTE -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
CTRL_ADDR=$(echo "$PARAMS" | grep '\--control ' | cut -f2 -d' ')
|
CTRL_ADDR=$(echo "$PARAMS" | grep '\--control ' | cut -f2 -d' ')
|
||||||
if [ "$CTRL_ADDR" = "" ]; then
|
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
|
fi
|
||||||
if [ "$CTRL_ADDR" = "" ]; then
|
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."
|
echo "${0##*/}: ERROR: cannot detect control socket. Did you start unitd with a relative path? Try starting unitd with --control option."
|
||||||
|
|||||||
Reference in New Issue
Block a user