Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run to make fail2ban.local consistent with jail.local #508

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/init-fail2ban-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ cp -R /defaults/fail2ban/action.d /config/fail2ban/
if [[ ! -f /config/fail2ban/jail.local ]]; then
cp /defaults/fail2ban/jail.local /config/fail2ban/jail.local
fi
# if fail2ban.local is missing in /config, copy default
if [[ ! -f /config/fail2ban/fail2ban.local ]]; then
cp /defaults/fail2ban/fail2ban.local /config/fail2ban/fail2ban.local
fi
# Replace fail2ban config with user config
if [[ -d /etc/fail2ban/filter.d ]]; then
rm -rf /etc/fail2ban/filter.d
Expand All @@ -26,7 +30,7 @@ if [[ -d /etc/fail2ban/action.d ]]; then
fi
cp -R /config/fail2ban/filter.d /etc/fail2ban/
cp -R /config/fail2ban/action.d /etc/fail2ban/
cp /defaults/fail2ban/fail2ban.local /etc/fail2ban/
cp /config/fail2ban/fail2ban.local /etc/fail2ban/fail2ban.local
cp /config/fail2ban/jail.local /etc/fail2ban/jail.local

# logfiles needed by fail2ban
Expand Down
Loading