Well I had build a script before to start it on my Redhat 7.2  Now the RPM
package does the job perfectly.  But just in case you still want to do it
manually, here I put both versions.

lapja

P.S. Nobody has an answer for my question on nmap plugin ?


------the scripts----------------------
----the one that I had build before

#!/bin/sh
#
# Startup script for program
#
# chkconfig: 345 85 15
# description: NTOP daemon
# processname: ntop
#

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

#$OPTIONS ="-P /var/log/ntop -u admin -E -m 192.168.1.0/24 -S 2  -i
eth1,ppp0  -w3000 -d -b localhost:4000"
#
case $1 in
  start)
        echo -n $"Starting  ntop: "
        daemon /usr/local/bin/ntop -P /var/log/ntop -u ntop -E -m
192.168.1.0/24 -S 2 -i eth1,ppp0  -w 3000 -d
        echo
        touch /var/lock/subsys/ntop

    ;;
  stop)
        echo -n $"Shutting down ntop: "
        killproc /var/lock/subsys/ntop
        echo
        rm -f /var/lock/subsys/ntop

        ;;
  status)
        status ntop
        ;;
  restart)
         $0 stop
         $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac

exit 0



-----the one that comes with the rpm package

#!/bin/sh
#
# chkconfig: 2345 93 83
#
# description: This shell script takes care of starting and stopping ntop.
# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

prog="/usr/sbin/ntop"
name=ntop

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

! [ -x $prog ] && echo $prog not found, aborting && exit 1


start () {
  # start daemon
  echo -n $"Starting $name: "
#NOTE:  You most likely will have to fix this up to reflect your network.
#       Do not run ntop until you have read the docs/1STRUN.txt file to set
#       the admin password!
  daemon $prog -d -P /usr/share/ntop/ -u ntop -E
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && touch /var/lock/subsys/ntop
  return $RETVAL
}

stop () {
  # stop daemon
  echo -n $"Stopping $name: "
  killproc ntop
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && rm -f /var/lock/subsys/ntop
  return $RETVAL
}

restart () {
  stop
  start
}

case "$1" in
  start)
    start
  ;;

  stop)
    stop
  ;;

  restart)
    restart
  ;;

  condrestart)
    [ -f /var/lock/subsys/ntop ] && restart || :
  ;;

  status)
    status ntop
  ;;
  *)
    echo $"Usage: $0 {start|stop|restart|condrestart|status}"
    exit 1
esac

exit $RETVAL

----- Original Message -----
From: "Devon Harding - GTHLA" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 8:56 PM
Subject: [Ntop] ntop init script


> How do I create a boot time init script for ntop running under RedHat 7.3?
>
> _____________________
> Devon Harding
> System Administrator
> Gilat Latin America
> 954-858-1600
> [EMAIL PROTECTED]
>
>
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop
>


_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to