From c8ed0e0d913feeb361de800d1af6fd56e96bb840 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 15 Jul 2018 13:44:53 -0400 Subject: files/fail2ban-openrc.init: use the standard OpenRC "retry" variable. If the "retry" variable is set in the service script, we don't have to pass it to start-stop-daemon explicitly. While we can't immediately eliminate any code with this change, it will be necessary later to adopt the default OpenRC stop() function. --- files/fail2ban-openrc.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'files') diff --git a/files/fail2ban-openrc.init b/files/fail2ban-openrc.init index bcbdf8fd..e3ddfe1a 100755 --- a/files/fail2ban-openrc.init +++ b/files/fail2ban-openrc.init @@ -26,6 +26,7 @@ extra_started_commands="reload showlog" command="/usr/bin/fail2ban-client" command_args="${FAIL2BAN_OPTIONS}" pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid" +retry="30" depend() { use logger @@ -49,7 +50,7 @@ start() { stop() { ebegin "Stopping ${RC_SVCNAME}" - start-stop-daemon --stop --pidfile "${pidfile}" --retry 30 \ + start-stop-daemon --stop --pidfile "${pidfile}" --retry "${retry}" \ -- ${command} ${command_args} stop eend $? "Failed to stop ${RC_SVCNAME}" } -- cgit v1.2.1