]> git.pld-linux.org Git - packages/ntop.git/commitdiff
- complain if NTOP_DIR is not set, cosmetics in "not initialized" message
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 12 Dec 2003 12:40:50 +0000 (12:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- removed NTOP_IFACE - this is set in ntop.conf
- pass ntop.conf as ntop config file, use standard daemon function

Changed files:
    ntop.init -> 1.4

ntop.init

index d10418714d51315a7379e1554239079087ceb5b1..7470685d10422062cfb9eed5972ff3c85eb4583d 100644 (file)
--- a/ntop.init
+++ b/ntop.init
@@ -26,6 +26,11 @@ else
        exit 0
 fi
 
+if [ -z "$NTOP_DIR" ]; then
+       nls "NTOP_DIR not set in /etc/sysconfig/ntop"
+       exit 6
+fi
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -34,16 +39,15 @@ case "$1" in
        if [ ! -f "$NTOP_DIR/addressQueue.db" ]; then
                nls "ntop is not initialized. Try \"%s init\" before start." "$0"
                echo ""
-               nls "after setting password please ^C, to stop the daemon"
+               nls "After setting password please press ^C to stop the daemon."
                exit 6
        fi
 
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/ntop ]; then
                msg_starting ntop
-               ntop -d -P $NTOP_DIR -i $NTOP_IFACE > /dev/null 2>&1
+               daemon ntop -d -P $NTOP_DIR @/etc/ntop.conf
                RETVAL=$?
-               [ $RETVAL -eq 0 ] && ok || fail
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ntop
        else
                msg_already_running ntop
@@ -74,7 +78,7 @@ case "$1" in
        fi
        ;;
   init)
-       ntop -P $NTOP_DIR -i $NTOP_IFACE
+       ntop -P $NTOP_DIR @/etc/ntop.conf
        ;;
   status)
        status ntop
This page took 0.136719 seconds and 4 git commands to generate.