|
From: Eric M. <eri...@ep...> - 2003-01-23 02:47:44
|
Hi there,
I just installed iptablelog on my firewall running redhat and I had to
create a new startup script for feed_db.pl
For those of you who are interrested here it is:
#!/bin/bash
# iptablelog init file for iptable logfile analyzer
#
# chkconfig: - 13 85
# description: IPTables Logfile Analyzer database feeder
#
# processname: /usr/local/bin/feed_db.pl
# config: /usr/local/bin/feed_db.pl
# pidfile: /var/run/iptablelog
# source function library
. /etc/init.d/functions
OPTIONS="--background"
RETVAL=0
prog="feed_db.pl"
start() {
echo -n $"Starting $prog: "
daemon /usr/local/bin/feed_db.pl $OPTIONS
RETVAL=$?
echo
touch /var/lock/subsys/iptablelog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc /usr/local/bin/feed_db.pl
RETVAL=$?
echo
rm -f /var/lock/subsys/iptablelog
return $RETVAL
}
restart(){
stop
start
}
condrestart(){
[ -e /var/lock/subsys/iptablelog ] && restart
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
status feed_db.pl
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
RETVAL=1
esac
exit $RETVAL
__
Eric Moret, Senior Security Engineer Phone: (408)616-4920
NetScreen Technologies, Inc. Fax: (208)247-8829
350 Oakmead Parkway, Sunnyvale CA 94085
PGP
Fingerprint 0982 AC22 1CB0 1180 4E47 968F 0910 C92E CE7D CFEA
|