* Added force-start action to init script, so it could be forced

to start if previous run crashed and left a socket file. Must to be
  used with caution.
pull/3/head debian/0.8.1-2
Yaroslav Halchenko 2007-10-18 22:03:37 -04:00
parent 8d9aca4e20
commit 2553e2717a
3 changed files with 17 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*~

7
debian/changelog vendored
View File

@ -1,8 +1,11 @@
fail2ban (0.8.1-2~pre1) UNRELEASED; urgency=low
fail2ban (0.8.1-2) unstable; urgency=low
* Fixed named-refused filter.
* Added force-start action to init script, so it could be forced
to start if previous run crashed and left a socket file. Must to be
used with caution.
-- Yaroslav Halchenko <debian@onerussian.com> Tue, 14 Aug 2007 23:16:56 -0400
-- Yaroslav Halchenko <debian@onerussian.com> Thu, 18 Oct 2007 18:31:58 -0400
fail2ban (0.8.1-1) unstable; urgency=low

16
debian/fail2ban.init vendored Normal file → Executable file
View File

@ -94,7 +94,10 @@ do_start()
if [ -e "$SOCKFILE" ]; then
log_failure_msg "Socket file $SOCKFILE is present"
return 2
[ "$1" == "force-start" ] \
&& log_success_msg "Starting anyway as requested" \
|| return 2
DAEMON_ARGS="$DAEMON_ARGS -x"
fi
start-stop-daemon --start --quiet --chuid root --exec $DAEMON -- \
@ -159,17 +162,20 @@ log_end_msg_wrapper()
log_end_msg $value
}
case "$1" in
start)
command="$1"
case "$command" in
start|force-start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
do_start "$command"
[ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
[ "$VERBOSE" != no ] && log_end_msg_wrapper $? 2
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
@ -210,7 +216,7 @@ case "$1" in
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
echo "Usage: $SCRIPTNAME {start|force-start|stop|restart|force-reload|status}" >&2
exit 3
;;
esac