mirror of https://github.com/fail2ban/fail2ban
BF: debian/fail2ban.init - fixed handling of the return code from do_start/do_stop
parent
39699896aa
commit
b89e6ca770
|
@ -1,3 +1,10 @@
|
||||||
|
fail2ban (0.8.10-2) unstable; urgency=low
|
||||||
|
|
||||||
|
* debian/fail2ban.init:
|
||||||
|
- fixed handling of the return code from do_start/do_stop
|
||||||
|
|
||||||
|
-- Yaroslav Halchenko <debian@onerussian.com> Wed, 19 Jun 2013 21:56:01 -0400
|
||||||
|
|
||||||
fail2ban (0.8.10-1) unstable; urgency=high
|
fail2ban (0.8.10-1) unstable; urgency=high
|
||||||
|
|
||||||
* New upstream release
|
* New upstream release
|
||||||
|
|
|
@ -176,8 +176,10 @@ do_reload() {
|
||||||
#
|
#
|
||||||
log_end_msg_wrapper()
|
log_end_msg_wrapper()
|
||||||
{
|
{
|
||||||
|
if [ "$3" != "no" ]; then
|
||||||
[ $1 -lt $2 ] && value=0 || value=1
|
[ $1 -lt $2 ] && value=0 || value=1
|
||||||
log_end_msg $value
|
log_end_msg $value
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
command="$1"
|
command="$1"
|
||||||
|
@ -185,13 +187,13 @@ case "$command" in
|
||||||
start|force-start)
|
start|force-start)
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
do_start "$command"
|
do_start "$command"
|
||||||
[ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2
|
log_end_msg_wrapper $? 2 "$VERBOSE"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
do_stop
|
do_stop
|
||||||
[ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2
|
log_end_msg_wrapper $? 2 "$VERBOSE"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
|
@ -200,7 +202,7 @@ case "$command" in
|
||||||
case "$?" in
|
case "$?" in
|
||||||
0|1)
|
0|1)
|
||||||
do_start
|
do_start
|
||||||
log_end_msg_wrapper $? 1
|
log_end_msg_wrapper $? 1 "always"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Failed to stop
|
# Failed to stop
|
||||||
|
|
Loading…
Reference in New Issue