mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-03-06 23:31:34 +00:00
Make fail2ban a normal systemd service in nixos module.
This commit is contained in:
parent
73284567cc
commit
c5f6a08750
|
@ -98,11 +98,12 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
jobs.fail2ban =
|
||||
systemd.services.fail2ban =
|
||||
{ description = "Fail2ban intrusion prevention system";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
startOn = "started networking";
|
||||
|
||||
path = [ pkgs.fail2ban pkgs.iptables ];
|
||||
|
||||
preStart =
|
||||
|
@ -113,7 +114,7 @@ in
|
|||
mkdir -p /var/run/fail2ban -m 0755
|
||||
'';
|
||||
|
||||
exec = "fail2ban-server -f";
|
||||
serviceConfig.ExecStart = "${pkgs.fail2ban}/bin/fail2ban-server -f";
|
||||
|
||||
postStart =
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue