From b3c9fa30e974a936f0df5d8216aa129637457604 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 10 May 2011 08:49:48 -0400 Subject: The old ntop package xml was downloading a 32-bit library that isn't needed on 2.0 and will just break things even more. Shuffle things around a bit and hopefully let it work properly. --- config/ntop2/ntop.xml | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 config/ntop2/ntop.xml (limited to 'config/ntop2') diff --git a/config/ntop2/ntop.xml b/config/ntop2/ntop.xml new file mode 100644 index 00000000..0d420455 --- /dev/null +++ b/config/ntop2/ntop.xml @@ -0,0 +1,151 @@ + + + + + + + + ntop + 3.0 + Diagnostics: ntop Settings + Change + pkg_edit.php?xml=ntop.xml&id=0 + + ntop Settings + Set ntop settings such as password and port. +
Diagnostics
+ /pkg_edit.php?xml=ntop.xml&id=0 +
+ + ntop + Access ntop +
Diagnostics
+ http://$myurl:3000 + ntop +
+ + ntop + ntop.sh + ntop + + + + ntop Settings + /pkg_edit.php?xml=ntop.xml&id=0 + + + + Access ntop + http://$myurl:3000 + + + + + ntop Admin Password + password + Enter the password for the NTOP Web GUI. Minimum 5 characters. + password + + + ntop Admin Password AGAIN + passwordagain + password + + + Interface + interface_array + interfaces_selection + 3 + lan + true + + + + function sync_package_ntop() { + conf_mount_rw(); + config_lock(); + global $config; + global $input_errors; + $ntop_config =& $_POST; + $if_final = ""; + $ifaces_final = ""; + system("/bin/mkdir -p /var/db/ntop"); + system("/bin/mkdir -p /var/db/ntop/rrd"); + system("/bin/mkdir -p /var/db/ntop/rrd/graphics"); + system("/bin/chmod -R 755 /var/db/ntop"); + system("/usr/sbin/chown -R nobody:nobody /var/db/ntop"); + if($ntop_config['password'] and $ntop_config['passwordagain']) { + if($ntop_config['password'] == $ntop_config['passwordagain']) { + $first = 0; + foreach($_POST['interface_array'] as $iface) { + $if = convert_friendly_interface_to_real_interface_name($iface); + if($if) { + if($first == 1) + $ifaces_final .= ","; + $ifaces_final .= $if; + $first = 1; + } + } + exec("/usr/local/bin/ntop --set-admin-password=" . $_POST['password'] . " &", $ntopout); + $start = "/usr/local/bin/ntop -i " . $ifaces_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &"; + write_rcfile(array( + "file" => "ntop.sh", + "start" => $start, + "stop" => "/usr/bin/killall ntop" + ) + ); + restart_service("ntop"); + } else { + $input_errors[] = "The provided passwords did not match."; + } + } else { + $input_errors[] = "You must provide (and confirm) ntop's password."; + } + conf_mount_ro(); + config_unlock(); + } + + + sync_package_ntop(); + + + sync_package_ntop(); + + + + + exec("rm /usr/local/etc/rc.d/ntop*"); + +
\ No newline at end of file -- cgit v1.2.3