From c90af7d498d87fedf55e55c8d0e4f36fad4ce1c0 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Tue, 24 Sep 2019 15:22:02 +0900 Subject: [PATCH] Update wireguard.sh --- wireguard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireguard.sh b/wireguard.sh index 59add2a..92395ed 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -341,7 +341,7 @@ set_firewall() { if _exists "firewall-cmd"; then if [ "$(firewall-cmd --state | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "running" ]; then default_zone="$(firewall-cmd --get-default-zone)" - if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "no" ]; then + if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade)" = "no" ]; then _error_detect "firewall-cmd --zone=${default_zone} --add-masquerade" fi if ! firewall-cmd --list-ports | grep -qw "${SERVER_WG_PORT}/udp"; then