From 65fb48b5688d8861496e279bc43390d8ed433213 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 9 Oct 2019 08:57:12 +0200 Subject: [PATCH] firewall_pleroma_rejects.sh: Only generate rule if IP is found. --- firewall_pleroma_rejects.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firewall_pleroma_rejects.sh b/firewall_pleroma_rejects.sh index 4c1de60..ece56ab 100755 --- a/firewall_pleroma_rejects.sh +++ b/firewall_pleroma_rejects.sh @@ -4,7 +4,7 @@ # BE CAREFUL: Some instances may run under a shared IP, you may block more than # you want. Watch out for timeouts in the logs. No warranties and so on. -# Version: 2019-08-15_1 +# Version: 2019-10-09_1 # You can modify the ignore-list in # "${XDG_CONFIG_HOME}/firewall_pleroma_rejects/ignorelist.user", @@ -170,7 +170,7 @@ function main() for domain in $(get_domains "${instance}"); do for ip in $(get_ips "${domain}"); do - gen_rule "${ip}" "${domain}" + [[ -n "${ip}" ]] && gen_rule "${ip}" "${domain}" done done