2 # DenyHosts - ssh brute force attack scanner
5 # description: DenyHosts - ssh brute force attack scanner
7 # Source function library
8 . /etc/rc.d/init.d/functions
11 . /etc/sysconfig/network
14 [ -f /etc/sysconfig/DenyHosts ] && . /etc/sysconfig/DenyHosts
16 # Check that networking is up.
17 if is_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
19 msg_network_down "DenyHosts"
27 # See how we were called.
30 # Check if the service is already running?
31 if [ ! -f /var/lock/subsys/DenyHosts ]; then
32 msg_starting "DenyHosts"
33 daemon /usr/sbin/DenyHostsctl start --config /etc/DenyHosts.cfg
34 touch /var/lock/subsys/DenyHosts
36 msg_already_running "DenyHosts"
40 # Check if the service is already running?
41 if [ -f /var/lock/subsys/DenyHosts ]; then
42 msg_stopping "DenyHosts"
44 daemon /usr/sbin/DenyHostsctl stop
45 rm -f /var/lock/subsys/DenyHosts
47 msg_not_running "DenyHosts"
57 /usr/sbin/DenyHostsctl status
61 msg_usage "$0 {start|stop|restart|force-reload|status}"