Skip to content

Commit

Permalink
Don't check for jail.local...assume we're fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 22, 2017
1 parent 81c2bd4 commit 667ef13
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 55 deletions.
4 changes: 3 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = Virtualmin-Config
version = 6.0.7
version = 6.0.8
author = Joe Cooper <swelljoe@gmail.com>
license = GPL_3
copyright_holder = Joe Cooper
Expand All @@ -12,6 +12,8 @@ revision = 2
[GatherDir]
exclude_filename = Makefile.PL

[PerlTidy]

[Test::Perl::Critic]

[GithubMeta]
Expand Down
3 changes: 0 additions & 3 deletions lib/Virtualmin/Config/Plugin/Fail2ban.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ sub actions {
}

sub create_fail2ban_jail {
if (-e "/etc/fail2ban/jail.local") {
die "Fail2ban already has local configuration. Will not overwrite.";
}
open(my $JAIL_LOCAL, '>', '/etc/fail2ban/jail.local');
print $JAIL_LOCAL <<EOF;
[sshd]
Expand Down
6 changes: 2 additions & 4 deletions lib/Virtualmin/Config/Plugin/Fail2banFirewalld.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ sub actions {
foreign_require('init', 'init-lib.pl');
init::enable_at_boot('fail2ban');

my $err;
if (has_command('fail2ban-server')) {

# Create a jail.local with some basic config
create_fail2ban_jail();
my $err = create_fail2ban_jail();
create_fail2ban_firewalld();
}

Expand All @@ -61,9 +62,6 @@ sub actions {
}

sub create_fail2ban_jail {
if (-e "/etc/fail2ban/jail.local") {
die "Fail2ban already has local configuration. Will not overwrite.";
}
open(my $JAIL_LOCAL, '>', '/etc/fail2ban/jail.local');
print $JAIL_LOCAL <<EOF;
[sshd]
Expand Down
47 changes: 0 additions & 47 deletions t/data/etc/webmin/miniserv.conf

This file was deleted.

0 comments on commit 667ef13

Please sign in to comment.