mirror of https://github.com/fail2ban/fail2ban
fresh changes I forgotten to submit :-/
parent
12ddba6cf2
commit
f0e4ef017c
|
@ -27,52 +27,47 @@ DAEMON_OPTS=$FAIL2BAN_OPTS
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DESC: "
|
echo -n "Starting $DESC: "
|
||||||
[ -f $PIDFILE ] && [ ! -d /proc/`cat $PIDFILE` ] && rm -f $PIDFILE
|
[ -f $PIDFILE ] && [ ! -d /proc/`cat $PIDFILE` ] && rm -f $PIDFILE
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||||
-b --exec $DAEMON -- $DAEMON_OPTS
|
-b --exec $DAEMON -- $DAEMON_OPTS
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping $DESC: "
|
echo -n "Stopping $DESC: "
|
||||||
start-stop-daemon --stop --quiet --pidfile $PIDFILE
|
start-stop-daemon --stop --quiet --pidfile $PIDFILE
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
#
|
echo -n "Restarting $DESC: "
|
||||||
# If the "reload" option is implemented, move the "force-reload"
|
( $0 stop )
|
||||||
# option to the "reload" entry above. If not, "force-reload" is
|
sleep 1
|
||||||
# just the same as "restart".
|
$0 start
|
||||||
#
|
;;
|
||||||
echo -n "Restarting $DESC: "
|
|
||||||
( $0 stop )
|
|
||||||
sleep 1
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
status)
|
status)
|
||||||
echo -n "Status of $DESC: "
|
echo -n "Status of $DESC: "
|
||||||
if [ ! -e "$PIDFILE" ]; then
|
if [ ! -e "$PIDFILE" ]; then
|
||||||
echo "$NAME is not running."
|
echo "$NAME is not running."
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
if [ ! -r "$PIDFILE" ]; then
|
if [ ! -r "$PIDFILE" ]; then
|
||||||
echo "$PIDFILE not readable, status of $NAME unknown."
|
echo "$PIDFILE not readable, status of $NAME unknown."
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
if [ -d /proc/`cat "$PIDFILE"` ]; then
|
if [ -d /proc/`cat "$PIDFILE"` ]; then
|
||||||
echo "$NAME is running."
|
echo "$NAME is running."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "$NAME is not running but $PIDFILE exists."
|
echo "$NAME is not running but $PIDFILE exists."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
*)
|
|
||||||
N=/etc/init.d/$NAME
|
|
||||||
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
N=/etc/init.d/$NAME
|
||||||
|
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -15,8 +15,11 @@ fail2ban with apache, please enable apache section manually in
|
||||||
/etc/fail2ban.conf.
|
/etc/fail2ban.conf.
|
||||||
|
|
||||||
Currently no checks if an iptables queue generated at the beginning
|
Currently no checks if an iptables queue generated at the beginning
|
||||||
(fail2ban-http and fail2ban-ssh) exists. So if your firewall resets
|
(fail2ban-http and fail2ban-ssh) exists. So if your firewall resets the iptable
|
||||||
the iptable rules -- it is your responsibility to restart fail2ban.
|
rules -- it is your responsibility to restart fail2ban. Also you can
|
||||||
|
augment fwban and fwunban rules and include as first lines full
|
||||||
|
definitions of fwstart. That is nasty solution and probably it will get
|
||||||
|
resolved in the future.
|
||||||
|
|
||||||
See TODO.Debian for more details, as well as the Debian Bug
|
See TODO.Debian for more details, as well as the Debian Bug
|
||||||
Tracking system.
|
Tracking system.
|
||||||
|
|
Loading…
Reference in New Issue