From ed7ba14cb1127781c631d60bda457dca5b094f74 Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Fri, 28 Oct 2022 14:28:35 +0300 Subject: [PATCH] Correct regex for port parsing --- run-document-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-document-server.sh b/run-document-server.sh index 678a865..f290e8d 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -199,7 +199,7 @@ parse_rabbitmq_url(){ # extract the host local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)" # by request - try to extract the port - local port="$(echo $hostport | sed -r 's/^[^:]+|[^[:digit:]]//g')" + local port="$(echo $hostport | grep : | sed -r 's_^.*:+|/.*$__g')" local host if [ -n "$port" ]; then