From a689c4eb6e3ac125e1bbb96c1bf70be99c747036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20K=C5=82os?= Date: Mon, 22 Aug 2022 11:00:10 +0200 Subject: [PATCH] Fix (almost) always truthy regexp in ufw-docker--list --- ufw-docker | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ufw-docker b/ufw-docker index bc8a787..5568e11 100755 --- a/ufw-docker +++ b/ufw-docker @@ -42,7 +42,9 @@ function ufw-docker--list() { NETWORK="[[:graph:]]*" fi - ufw status numbered | grep "# allow ${INSTANCE_NAME}\\( ${INSTANCE_PORT}\\/${PROTO}\\)\\?\\( ${NETWORK}\\)\\?\$" + ufw status numbered | grep "# allow ${INSTANCE_NAME}\\( ${INSTANCE_PORT}\\/${PROTO}\\)\\( ${NETWORK}\\)\$" || \ + ufw status numbered | grep "# allow ${INSTANCE_NAME}\\( ${INSTANCE_PORT}\\/${PROTO}\\)\$" || \ + ufw status numbered | grep "# allow ${INSTANCE_NAME}\$" } function ufw-docker--list-number() {