diff options
author | Michael Orlitzky <michael@orlitzky.com> | 2018-07-15 13:44:53 -0400 |
---|---|---|
committer | Michael Orlitzky <michael@orlitzky.com> | 2018-07-15 18:22:48 -0400 |
commit | c8ed0e0d913feeb361de800d1af6fd56e96bb840 (patch) | |
tree | 1c931ab6de94f64077f4030069ad656a3b140c35 /files | |
parent | e0097aefb95bac48c992f6b5ae58fc99140ecc03 (diff) | |
download | fail2ban-c8ed0e0d913feeb361de800d1af6fd56e96bb840.tar.gz |
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.
Diffstat (limited to 'files')
-rwxr-xr-x | files/fail2ban-openrc.init | 3 |
1 files changed, 2 insertions, 1 deletions
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}" } |