Create fail2ban DB if it doesn't exist
This commit is contained in:
parent
5420a45ffa
commit
77ba56b52e
|
@ -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.
|
||||
$OUT .=<<'EOF';
|
||||
OLD_Fail2Ban=$(get_safe_id Fail2Ban filter find)
|
||||
|
|
|
@ -5,7 +5,7 @@ use warnings;
|
|||
use esmith::ConfigDB;
|
||||
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 %opts;
|
||||
|
||||
|
|
Loading…
Reference in New Issue