diff --git a/sbin/fbl.sh b/sbin/firewall-blacklist-add.sh similarity index 78% rename from sbin/fbl.sh rename to sbin/firewall-blacklist-add.sh index 476e618..99d1993 100755 --- a/sbin/fbl.sh +++ b/sbin/firewall-blacklist-add.sh @@ -8,7 +8,7 @@ else exit 1 fi -if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then +if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then echo "IP $IP already in blacklist. Doing nothing." diff --git a/sbin/fwl.sh b/sbin/firewall-blacklist-rem.sh similarity index 79% rename from sbin/fwl.sh rename to sbin/firewall-blacklist-rem.sh index ca4419f..fd0d9e6 100755 --- a/sbin/fwl.sh +++ b/sbin/firewall-blacklist-rem.sh @@ -8,7 +8,7 @@ else exit 1 fi -if [[ firewall-cmd --ipset=blacklist --query-entry $IP >/dev/null ]]; then +if [[ `firewall-cmd --ipset=blacklist --query-entry $IP` = "yes" ]]; then firewall-cmd --ipset=blacklist --remove-entry=$IP firewall-cmd --permanent --ipset=blacklist --remove-entry=$IP