firewall_pleroma_rejects.sh: Only generate rule if IP is found.
This commit is contained in:
parent
8297b2c21f
commit
65fb48b568
|
@ -4,7 +4,7 @@
|
||||||
# BE CAREFUL: Some instances may run under a shared IP, you may block more than
|
# 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.
|
# 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
|
# You can modify the ignore-list in
|
||||||
# "${XDG_CONFIG_HOME}/firewall_pleroma_rejects/ignorelist.user",
|
# "${XDG_CONFIG_HOME}/firewall_pleroma_rejects/ignorelist.user",
|
||||||
|
@ -170,7 +170,7 @@ function main()
|
||||||
|
|
||||||
for domain in $(get_domains "${instance}"); do
|
for domain in $(get_domains "${instance}"); do
|
||||||
for ip in $(get_ips "${domain}"); do
|
for ip in $(get_ips "${domain}"); do
|
||||||
gen_rule "${ip}" "${domain}"
|
[[ -n "${ip}" ]] && gen_rule "${ip}" "${domain}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue