firewall_pleroma_rejects.sh: Only generate rule if IP is found.

This commit is contained in:
tastytea 2019-10-09 08:57:12 +02:00
parent 8297b2c21f
commit 65fb48b568
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -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