Skip to content

Commit

Permalink
add systemd support, extend installation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiering committed Jul 30, 2023
1 parent 4d65b5e commit fa76e32
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fail2ban-block-ip-range.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=fail2ban block IP range / runjob triggered by timer

# run only if main service is running
BindsTo=fail2ban.service

[Service]
Type=oneshot
User=root
Group=root
ExecStart=/usr/bin/fail2ban-block-ip-range.py
15 changes: 15 additions & 0 deletions fail2ban-block-ip-range.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=fail2ban block IP range / run every 5 min fail2ban-block-ip-range.service

# run only if main service is running
PartOf=fail2ban.service
After=fail2ban.service

[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
RandomizedDelaySec=30
Persistent=true

[Install]
WantedBy=timers.target fail2ban.service

0 comments on commit fa76e32

Please sign in to comment.