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
start)
# Check if ntop is initialized
- 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"
+ if [ ! -f "$NTOP_DIR/ntop_pw.db" ]; then
+ nls "ntop is not initialized. Try '%s init' before start." /etc/rc.d/init.d/ntop
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 > /dev/null 2>&1
+ daemon --redirdfs /usr/sbin/ntop @/etc/ntop.conf -d -P $NTOP_DIR
RETVAL=$?
- [ $RETVAL -eq 0 ] && ok || fail
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ntop
else
msg_already_running ntop
rm -f /var/lock/subsys/ntop >/dev/null 2>&1
else
msg_not_running ntop
- fi
+ fi
;;
restart)
$0 stop
fi
;;
init)
- ntop -P $NTOP_DIR
+ ntop -P $NTOP_DIR @/etc/ntop.conf -A
;;
status)
status ntop