Support disabling f2b

This commit is contained in:
thespad
2024-12-17 20:34:13 +00:00
parent 2dc24f90c7
commit 589b80e492
4 changed files with 6 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]] && [[ "${DISABLE_F2B,,}" != "true" ]]; then
if ! iptables -L &> /dev/null; then
ln -sf /usr/sbin/xtables-legacy-multi /usr/sbin/iptables
ln -sf /usr/sbin/xtables-legacy-multi /usr/sbin/iptables-save

View File

@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]] && [[ "${DISABLE_F2B,,}" != "true" ]]; then
exec \
fail2ban-client -x -f start
else