mirror of https://github.com/fail2ban/fail2ban
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".pull/2182/head
parent
0b146208eb
commit
e0097aefb9
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue