1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
#
# Startup script for psad
#
# chkconfig: 345 99 05
# description: The Port Scan Attack Detector (psad)
# processname: psad
# pidfile: /var/run/psad.pid
# config: /etc/psad/psad.conf
#
restart() {
$0 stop
$0 start
}
# See how we were called.
case "$1" in
start)
echo -n "Starting psad: "
### psad enables signature matching and auto
### danger level assignment by default, so
### command line args are not necessary here.
/usr/sbin/psad
echo
;;
stop)
/usr/sbin/psad --Kill
;;
status)
/usr/sbin/psad --Status
;;
restart)
restart
;;
*)
echo "Usage: psad {start|stop|status|restart}"
exit 1
esac
|