Subversion Repositories configs

Rev

Blame | Last modification | View Log | RSS feed

#!/bin/sh
#
# System V init script for iptables logfile analyzer
#
# (c) Thomas Vallaitis <bonewood@gmx.net>
#
# pid isn't saved by iptables logfile analyzer (afaik) 
# we have two processes -> more difficult
#

# Source function library.
. /etc/rc.d/init.d/functions

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
LONGNAME="iptables logfile analyzer"
NAME="iptablelog"
DAEMON='/usr/local/sbin/feed_db.pl'

set -e

# Main Loop
case $1 in
start)
      echo -n "Starting $LONGNAME: ";
      $DAEMON &
      echo $NAME;
        ;;
stop)
      echo -n "Stopping $LONGNAME: "
      daemon --stop --quiet --pidfile /var/run/$NAME.pid || true
      rm -f /var/run/$NAME.pid
      echo $NAME
        ;;
*)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop}" >&2
        exit 1
        ;;
esac

exit 0

# EOF