Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Disable ntop on startup

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Snoopy
      last edited by

      As we all know, ntop on v1.2.3 is flaky, sometimes it works for months, sometimes only a few hours. But it is still a good tool for debugging, so I'd like to keep the package. But it still started during reboot. How to disable it?

      I tried to examine scripts in usr/local/etc/rc.d, but my *nix knowledge is not enough to handle it. I have darkstat package too, and it does not start on boot. So I compared ntop.sh/darkstat.sh, they are the essentially the same. ntop/darkstat files are different:

      darkstat:

      #!/bin/sh
      . /etc/rc.subr
      
      name=darkstat
      rcvar=`set_rcvar`
      
      command=/usr/local/sbin/$name
      start_precmd=darkstat_prestart
      
      load_rc_config $name
      : ${darkstat_enable="NO"}
      : ${darkstat_dir="/var/run/darkstat"}
      : ${darkstat_pidname="darkstat.pid"}
      : ${darkstat_dropuser="nobody"}
      : ${darkstat_flags=""}
      pidfile="${darkstat_dir}/${darkstat_pidname}"
      
      darkstat_prestart()
      {
      	if [ "x${darkstat_interface}" = "x" ]; then
      		err 1 "You must define \$darkstat_interface."
      	fi
      	mkdir -p ${darkstat_dir}
      	chown ${darkstat_dropuser} ${darkstat_dir}
      	chmod u+wx ${darkstat_dir}
      }
      
      darkstat_flags="-i ${darkstat_interface} --chroot ${darkstat_dir} \
      --pidfile ${darkstat_pidname} --user ${darkstat_dropuser} \
      ${darkstat_flags}"
      
      run_rc_command "$1"
      
      

      ntop:

      . /etc/rc.subr
      
      name=ntop
      rcvar=${name}_enable
      
      load_rc_config $name
      
      : ${ntop_enable="NO"}
      : ${ntop_flags="-d --use-syslog=daemon"}
      
      command=/usr/local/bin/ntop
      start_precmd="${name}_checkpw"
      
      ntop_checkpw()
      {
      	if [ ! -f /var/db/ntop/ntop_pw.db ]; then
      		err 1 "Please set admin password for ntop. Run '/usr/local/bin/ntop -u nobody -A'"
      	fi
      }
      
      run_rc_command "$1"
      
      

      What should I edit in ntop?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.