diff options
author | Michael Orlitzky <michael@orlitzky.com> | 2018-07-15 13:37:00 -0400 |
---|---|---|
committer | Michael Orlitzky <michael@orlitzky.com> | 2018-07-15 18:20:55 -0400 |
commit | e0097aefb95bac48c992f6b5ae58fc99140ecc03 (patch) | |
tree | cf1f0d03b42e164bb45522c0c82a36caf2dc92c9 /files | |
parent | 0b146208eb3a6f3ceb04d59e9e89c1cc914854ea (diff) | |
download | fail2ban-e0097aefb95bac48c992f6b5ae58fc99140ecc03.tar.gz |
files/fail2ban-openrc.init: use RC_SVCNAME instead of hard-coding the name.
If our service is installed under some other name, then we don't want
the service script to say things like "Starting fail2ban..." because
the name "fail2ban" won't make any sense at that point. Instead, we
use the $RC_SVCNAME variable to ensure that the service name matches
what we tell the user. Typically, however, $RC_SVCNAME will still be
"fail2ban".
Diffstat (limited to 'files')
-rwxr-xr-x | files/fail2ban-openrc.init | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/files/fail2ban-openrc.init b/files/fail2ban-openrc.init index e1cf5273..bcbdf8fd 100755 --- a/files/fail2ban-openrc.init +++ b/files/fail2ban-openrc.init @@ -40,24 +40,24 @@ start_pre() { } start() { - ebegin "Starting fail2ban" + ebegin "Starting ${RC_SVCNAME}" start-stop-daemon --start --pidfile "${pidfile}" \ -- ${command} ${command_args} start - eend $? "Failed to start fail2ban" + eend $? "Failed to start ${RC_SVCNAME}" } stop() { - ebegin "Stopping fail2ban" + ebegin "Stopping ${RC_SVCNAME}" start-stop-daemon --stop --pidfile "${pidfile}" --retry 30 \ -- ${command} ${command_args} stop - eend $? "Failed to stop fail2ban" + eend $? "Failed to stop ${RC_SVCNAME}" } reload() { - ebegin "Reloading fail2ban" + ebegin "Reloading ${RC_SVCNAME}" ${command} ${command_args} reload - eend $? "Failed to reload fail2ban" + eend $? "Failed to reload ${RC_SVCNAME}" } showlog(){ |