Fix Fail2Ban continuation lines to align under the directive value
This commit is contained in:
@@ -408,7 +408,9 @@ my @rv;
|
||||
my @v = ref($dir->{'value'}) eq 'ARRAY' ? @{$dir->{'value'}}
|
||||
: split(/\n/, $dir->{'value'});
|
||||
push(@rv, $dir->{'name'}." = ".shift(@v));
|
||||
push(@rv, map { " ".$_ } @v); # Continuation
|
||||
# Indent continuation lines to align with the first value
|
||||
my $indent = " " x (length($dir->{'name'}) + 3);
|
||||
push(@rv, map { $indent.$_ } @v);
|
||||
return @rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user