Group :: Sistema/Servidores
RPM: scanlogd
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
#!/bin/sh
#
# chkconfig: 2345 35 85
# description: \
# scanlogd detects and logs TCP port scans
#
# processname: scanlogd
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network
LOCKFILE=/var/lock/subsys/scanlogd
RETVAL=0
start()
{
is_yes "$NETWORKING" || return 0
start_daemon --lockfile "$LOCKFILE" --expect-user scanlogd -- scanlogd
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user scanlogd -- scanlogd
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart|condreload)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --expect-user scanlogd -- scanlogd
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac
exit $RETVAL