Author: glen                         Date: Mon Dec 18 00:52:38 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- cp ../BUILD/psad-2.0.1/init-scripts/psad-init.fedora ../SOURCES/psad.init

---- Files affected:
SOURCES:
   psad.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/psad.init
diff -u /dev/null SOURCES/psad.init:1.1
--- /dev/null   Mon Dec 18 01:52:38 2006
+++ SOURCES/psad.init   Mon Dec 18 01:52:33 2006
@@ -0,0 +1,91 @@
+#!/bin/bash
+#
+#   /etc/rc.d/init.d/psad
+#
+# Starts the psad daemon
+#
+# chkconfig: 345 95 5
+# description: The Port Scan Attack Detector (psad)
+# processname: psad
+
+# Source function library.
+. /etc/init.d/functions
+
+test -x /usr/sbin/psad || exit 0
+
+RETVAL=0
+
+#
+#   See how we were called.
+#
+
+prog="psad"
+
+start() {
+       # Check if psad is already running
+       if [ ! -f /var/lock/subsys/psad ]; then
+           echo -n $"Starting $prog: "
+           daemon /usr/sbin/psad
+           RETVAL=$?
+           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/psad
+           echo
+       fi
+       return $RETVAL
+}
+
+stop() {
+       echo -n $"Stopping $prog: "
+       killproc /usr/sbin/psadwatchd
+       if [ -f /var/run/psad/kmsgsd.pid ]; then
+               killproc /usr/sbin/kmsgsd
+       fi
+       killproc /usr/sbin/psad
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/psad
+       echo
+        return $RETVAL
+}
+
+
+restart() {
+       stop
+       start
+}      
+
+reload() {
+       restart
+}      
+
+status_psad() {
+       if [ -f /var/run/psad/kmsgsd.pid ]; then
+               status /usr/sbin/kmsgsd
+       fi
+       status /usr/sbin/psadwatchd
+       status /usr/sbin/psad
+}
+
+case "$1" in
+start)
+       start
+       ;;
+stop)
+       stop
+       ;;
+reload|restart)
+       restart
+       ;;
+condrestart)
+       if [ -f /var/lock/subsys/psad ]; then
+           restart
+       fi
+       ;;
+status)
+       status_psad
+       ;;
+*)
+       echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+       exit 1
+esac
+
+exit $?
+exit $RETVAL
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to