Set StateDirectory

This automatically handles permissions for /var/lib/fail2ban when run as a
non-root user.
pull/2537/head
Arto Jantunen 2019-10-04 18:08:47 +03:00
parent 60b136333e
commit f376da4bec
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ PartOf=iptables.service firewalld.service ip6tables.service ipset.service nftabl
Type=simple
Environment="PYTHONNOUSERSITE=1"
RuntimeDirectory=fail2ban
StateDirectory=fail2ban
ExecStart=@BINDIR@/fail2ban-server -xf start
# if should be logged in systemd journal, use following line or set logtarget to sysout in fail2ban.local
# ExecStart=@BINDIR@/fail2ban-server -xf --logtarget=sysout start