From 80b1007a8fece5817f36ba19061d8359201669c5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 15 Jul 2018 13:54:22 -0400 Subject: [PATCH] files/fail2ban-openrc.init: remove the "showlog" command. The extra "showlog" command in our OpenRC service script was more trouble than it was worth: the only thing it did was call "less" on a log file, and the service script is only guessing at the location of the log file (only the fail2ban server knows its true location). It's not like "/etc/init.d/fail2ban showlog" is that much easier to type than "less /var/log/fail2ban.log" in the first place, so I think the extra complexity (5 more lines in the service script) is not worth it. --- files/fail2ban-openrc.init | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/files/fail2ban-openrc.init b/files/fail2ban-openrc.init index e3ddfe1a..2de5ae33 100755 --- a/files/fail2ban-openrc.init +++ b/files/fail2ban-openrc.init @@ -20,8 +20,7 @@ description="Daemon to ban hosts that cause multiple authentication errors" description_reload="reload configuration" -description_showlog="show fail2ban logs" -extra_started_commands="reload showlog" +extra_started_commands="reload" command="/usr/bin/fail2ban-client" command_args="${FAIL2BAN_OPTIONS}" @@ -60,7 +59,3 @@ reload() { ${command} ${command_args} reload eend $? "Failed to reload ${RC_SVCNAME}" } - -showlog(){ - less /var/log/fail2ban.log -}