fix: few leftover SC2128 errors

https://www.shellcheck.net/wiki/SC2128
This commit is contained in:
2024-08-27 22:23:02 +03:00
parent 68e416c547
commit 4bf7edeabb

10
f2b
View File

@@ -647,7 +647,7 @@ if [ "$F2B_ARG1" == "ban" ]; then
# Ban IP address in all jails # Ban IP address in all jails
if [ -z "$F2B_ARG3" ]; then if [ -z "$F2B_ARG3" ]; then
# loop over jails and ban ip in all of them # loop over jails and ban ip in all of them
for JAIL in $F2B_JAILS_ARRAY; do for JAIL in "${F2B_JAILS_ARRAY[@]}"; do
f2b_ban_ip "$F2B_ARG2" "$JAIL" f2b_ban_ip "$F2B_ARG2" "$JAIL"
done done
exit 0 exit 0
@@ -674,7 +674,7 @@ if [ "$F2B_ARG1" == "unban" ]; then
# Unban IP address in all jails # Unban IP address in all jails
if [ -z "$F2B_ARG3" ]; then if [ -z "$F2B_ARG3" ]; then
# loop over jails and unban ip in all of them # loop over jails and unban ip in all of them
for JAIL in $F2B_JAILS_ARRAY; do for JAIL in "${F2B_JAILS_ARRAY[@]}"; do
f2b_unban_ip "$F2B_ARG2" "$JAIL" f2b_unban_ip "$F2B_ARG2" "$JAIL"
done done
exit 0 exit 0
@@ -715,7 +715,7 @@ if [ "$F2B_ARG1" == "logs" ]; then
"all") "all")
if [ -n "$F2B_ARG3" ]; then if [ -n "$F2B_ARG3" ]; then
# loop over jails and show logs for all of them # loop over jails and show logs for all of them
for JAIL in $F2B_JAILS_ARRAY; do for JAIL in "${F2B_JAILS_ARRAY[@]}"; do
f2b_jail_get_log_entries "$JAIL" "$F2B_ARG3" f2b_jail_get_log_entries "$JAIL" "$F2B_ARG3"
done done
exit 0 exit 0
@@ -749,13 +749,13 @@ if [ "$F2B_ARG1" == "logs-watch" ]; then
"all") "all")
if [ -n "$F2B_ARG3" ]; then if [ -n "$F2B_ARG3" ]; then
# loop over jails and watch logs for all of them # loop over jails and watch logs for all of them
for JAIL in $F2B_JAILS_ARRAY; do for JAIL in "${F2B_JAILS_ARRAY[@]}"; do
f2b_poll_jail_log_entries "$JAIL" "$F2B_ARG3" f2b_poll_jail_log_entries "$JAIL" "$F2B_ARG3"
done done
exit 0 exit 0
fi fi
# loop over jails and watch logs for all of them # loop over jails and watch logs for all of them
for JAIL in $F2B_JAILS; do for JAIL in "${F2B_JAILS[@]}"; do
f2b_poll_jail_log_entries "$JAIL" f2b_poll_jail_log_entries "$JAIL"
done done
exit 0 exit 0