From a85c334e4d24fc30bcd29dcddd2b5d3c7b6a9cfb Mon Sep 17 00:00:00 2001 From: evgeniy-antonyuk Date: Fri, 28 Oct 2022 11:59:08 +0300 Subject: [PATCH] Fix port parsing from amqp_uri --- 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 fd183a3..678a865 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 -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')" + local port="$(echo $hostport | sed -r 's/^[^:]+|[^[:digit:]]//g')" local host if [ -n "$port" ]; then