Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
#!/bin/sh
2
#
3
# System V init script for iptables logfile analyzer
4
#
5
# (c) Thomas Vallaitis <bonewood@gmx.net>
6
#
7
# pid isn't saved by iptables logfile analyzer (afaik)
8
# we have two processes -> more difficult
9
#
10
 
11
# Source function library.
12
. /etc/rc.d/init.d/functions
13
 
14
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
15
LONGNAME="iptables logfile analyzer"
16
NAME="iptablelog"
17
DAEMON='/usr/local/sbin/feed_db.pl'
18
 
19
set -e
20
 
21
# Main Loop
22
case $1 in
23
start)
24
      echo -n "Starting $LONGNAME: ";
25
      $DAEMON &
26
      echo $NAME;
27
        ;;
28
stop)
29
      echo -n "Stopping $LONGNAME: "
30
      daemon --stop --quiet --pidfile /var/run/$NAME.pid || true
31
      rm -f /var/run/$NAME.pid
32
      echo $NAME
33
        ;;
34
*)
35
        N=/etc/init.d/$NAME
36
        echo "Usage: $N {start|stop}" >&2
37
        exit 1
38
        ;;
39
esac
40
 
41
exit 0
42
 
43
# EOF