Create fail2ban DB if it doesn't exist

tags/0.0.1
Daniel Berteaud 12 years ago
parent 5420a45ffa
commit 77ba56b52e
  1. 3
      root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustFail2Ban
  2. 2
      root/sbin/e-smith/smeserver-fail2ban

@ -1,5 +1,6 @@
{ {
my $f2bdb = esmith::ConfigDB->open_ro('fail2ban'); my $f2bdb = esmith::ConfigDB->open_ro('fail2ban') ||
esmith::ConfigDB->create('fail2ban');
# Find the current Fail2Ban_$$ chain, and create a new one. # Find the current Fail2Ban_$$ chain, and create a new one.
$OUT .=<<'EOF'; $OUT .=<<'EOF';
OLD_Fail2Ban=$(get_safe_id Fail2Ban filter find) OLD_Fail2Ban=$(get_safe_id Fail2Ban filter find)

@ -5,7 +5,7 @@ use warnings;
use esmith::ConfigDB; use esmith::ConfigDB;
use Getopt::Long; use Getopt::Long;
our $f2bdb = esmith::ConfigDB->open('fail2ban'); our $f2bdb = esmith::ConfigDB->open('fail2ban') || esmith::ConfigDB->create('fail2ban');
our $c = esmith::ConfigDB->open_ro; our $c = esmith::ConfigDB->open_ro;
our %opts; our %opts;

Loading…
Cancel
Save