diff --git a/wireguard-install.sh b/wireguard-install.sh index a545f5f..4102ae8 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -170,7 +170,7 @@ Address = ${SERVER_WG_IPV4}/24,${SERVER_WG_IPV6}/64 ListenPort = ${SERVER_PORT} PrivateKey = ${SERVER_PRIV_KEY}" >"/etc/wireguard/${SERVER_WG_NIC}.conf" - if [ -x "$(command -v firewall-cmd)" ]; then + if pgrep firewalld; then FIREWALLD_IPV4_ADDRESS=$(echo "${SERVER_WG_IPV4}" | cut -d"." -f1-3)".0" # shellcheck disable=SC2001 FIREWALLD_IPV6_ADDRESS=$(echo "${SERVER_WG_IPV6}" | sed 's/:[^:]*$/:0/')