diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-11-22 13:03:18 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-11-22 13:03:18 -0300 |
commit | ba0b8906199404b7b00cfeac91bff3036b8692e8 (patch) | |
tree | 77d6dbaf822d1a66046f76c6698ec9d0f61a9bcd /pcr/psad/psad-sysvinit.archlinux | |
parent | adc549e8519824da803230cee62bfd7d808df989 (diff) | |
parent | f97ff910471fb3ae2c8ea69befecaae8cbf6dbea (diff) | |
download | abslibre-ba0b8906199404b7b00cfeac91bff3036b8692e8.tar.gz abslibre-ba0b8906199404b7b00cfeac91bff3036b8692e8.tar.bz2 abslibre-ba0b8906199404b7b00cfeac91bff3036b8692e8.zip |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to 'pcr/psad/psad-sysvinit.archlinux')
-rw-r--r-- | pcr/psad/psad-sysvinit.archlinux | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/psad/psad-sysvinit.archlinux b/pcr/psad/psad-sysvinit.archlinux new file mode 100644 index 000000000..6b4e76042 --- /dev/null +++ b/pcr/psad/psad-sysvinit.archlinux @@ -0,0 +1,52 @@ +#!/bin/bash +# +# 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 +# +# $Id: psad-init.archlinux + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/sshd + +PID=`cat /var/run/psad.pid` +# See how we were called. +case "$1" in +start) + stat_busy "Starting psad" + [ -z "$PID" ] && /usr/sbin/psad + if [ $? -gt 0 ]; then + stat_fail + else + #let psad take care of the pid; we don't need to + add_daemon psad + stat_done + fi + ;; +stop) + stat_busy "Stopping psad" + /usr/sbin/psad --Kill + if [ $? -gt 0 ]; then + stat_fail + else + #let psad take care of the pid; we don't need to + rm_daemon psad + stat_done + fi + ;; +status) + /usr/sbin/psad --Status + ;; +restart) + $0 stop + $0 start + ;; +*) + echo "Usage: psad {start|stop|status|restart}" + exit 1 +esac |