Only enable SSH jail if ssh service is enabled

tags/0.0.1
Daniel Berteaud 12 years ago
parent 6eb50b8c84
commit 390c697875
  1. 2
      root/etc/e-smith/templates/etc/fail2ban/jail.conf/30Service10ssh

@ -1,6 +1,8 @@
{ {
my $port = $sshd{'TCPPort'} || '22'; my $port = $sshd{'TCPPort'} || '22';
my $status = $sshd{'status'} || 'enabled';
return "" if ($status ne 'enabled');
$OUT .=<<"EOF"; $OUT .=<<"EOF";
[ssh] [ssh]

Loading…
Cancel
Save