LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   iptables log analyzer (http://www.linuxquestions.org/questions/linux-general-1/iptables-log-analyzer-756325/)

Ammad 09-19-2009 01:22 AM

iptables log analyzer
 
HI,

i have installed iptables log analyzer. but when i start, it reports error.

Code:

[root@linux log]#/etc/init.d/iptablelog start
Starting iptables logfile analyzer: /etc/init.d/iptablelog: line 22: start-stop-daemon: command not found

there is no start-stop-daemon command in linux on line 22, may be you can help me on this.


Code:


!/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
#

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

set -e

# Main Loop
case $1 in
start)
      echo -n "Starting $LONGNAME: ";
      start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- --background
      echo $NAME;
        ;;
stop)
      echo -n "Stopping $LONGNAME: "
      start-stop-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|restart|reload|force-reload}" >&2
        echo "Usage: $N {start|stop}" >&2
        exit 1
        ;;
esac

exit 0

# EOF


carltm 09-19-2009 04:43 AM

start-stop-daemon seems to be a SuSE command. Since you are familiar
with Red Hat based distributions, you might know about the service
command which has similar functionality.

You could rewrite the script to replace start-stop-daemon with service.

vishesh 09-19-2009 04:51 AM

I think start-stop-daemons should get replaced by 'daemon $NAME '

Thnks


All times are GMT -5. The time now is 11:03 AM.