Group :: Security/Networking
RPM: sshutout
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
#!/bin/sh
#
# sshutout Stop SSH Dictionary Attacks
#
# chkconfig: 2345 55 25
# description: Stop SSH Dictionary Attacks
# processname: sshutout
# config: /etc/sshutout.conf
# pidfile: /var/run/sshutout.pid
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
PIDFILE=/var/run/sshutout.pid
LOCKFILE=/var/lock/subsys/sshutout
RETVAL=0
start()
{
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- sshutout
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- sshutout
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
reload()
{
msg_reloading sshutout
stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP -- sshutout
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root -- sshutout
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL