From 0e70d266601bd87c07ee78056ec449979f15f22e Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Mon, 16 Sep 2024 11:30:08 +0100 Subject: [PATCH] tools/unitctl: adjust readme for socket addresses CONTROL_SOCKET_ADDRESS is singular, adds note that the flag can be specified multiple times, and adjusts code to print CONTROL_SOCKET_ADDRESS as singular. Signed-off-by: Gabor Javorszky --- tools/unitctl/README.md | 2 +- tools/unitctl/unitctl/src/unitctl.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/unitctl/README.md b/tools/unitctl/README.md index fdce6b322..ee02ab330 100644 --- a/tools/unitctl/README.md +++ b/tools/unitctl/README.md @@ -68,7 +68,7 @@ Commands: Options: -s, --control-socket-address - Path (unix:/var/run/unit/control.sock), tcp address with port (127.0.0.1:80), or URL + Path (unix:/var/run/unit/control.sock), tcp address with port (127.0.0.1:80), or URL. This flag can be specified multiple times. -w, --wait-timeout-seconds Number of seconds to wait for control socket to become available -t, --wait-max-tries diff --git a/tools/unitctl/unitctl/src/unitctl.rs b/tools/unitctl/unitctl/src/unitctl.rs index bd318991c..d73aca254 100644 --- a/tools/unitctl/unitctl/src/unitctl.rs +++ b/tools/unitctl/unitctl/src/unitctl.rs @@ -14,7 +14,8 @@ pub(crate) struct UnitCtl { short = 's', long = "control-socket-address", value_parser = parse_control_socket_address, - help = "Path (unix:/var/run/unit/control.sock), tcp address with port (127.0.0.1:80), or URL" + value_name = "CONTROL_SOCKET_ADDRESS", + help = "Path (unix:/var/run/unit/control.sock), tcp address with port (127.0.0.1:80), or URL. This flag can be specified multiple times." )] pub(crate) control_socket_addresses: Option>, #[arg(