From c9aedfabc1396a968b95ec71c30fc7b7305ca58e Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 7 Jan 2005 00:01:27 +0000 Subject: Add interfaces_selection field type which will populate a select box filled with the interfaces. --- packages/ntop/ntop.xml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml index 2efce7b6..3f6aeb9c 100644 --- a/packages/ntop/ntop.xml +++ b/packages/ntop/ntop.xml @@ -6,8 +6,8 @@ Change - NTop Password - Set NTop password. + NTop Settings + Set NTop settings such as password and port.
Diagnostics
ntop.xml
@@ -21,27 +21,32 @@ the configuration database. --> - NTOP Admin Password - password - Enter the password for the NTOP Web GUI. Minimum 5 characters. - password + NTOP Admin Password + password + Enter the password for the NTOP Web GUI. Minimum 5 characters. + password - NTOP Admin Password AGAIN - passwordagain - password + NTOP Admin Password AGAIN + passwordagain + password - - - if($_POST['password'] == $_POST['passwordagain']) { + + Interface + iface + interfaces_selection + + + + if($_POST['password'] == $_POST['passwordagain']) { system("/usr/local/bin/ntop --set-admin-password=" . $_POST['password']); system("killall ntop 2>/dev/null"); system("/usr/local/etc/rc.d/ntop.sh"); - } else { + } else { echo "Passwords do not match!"; exit; - } - + } + mwexec("/usr/bin/killall ntop"); @@ -49,7 +54,7 @@ system("rm /usr/local/etc/rc.d/ntop.sh"); $fout = fopen("/usr/local/etc/rc.d/ntop.sh","w"); fwrite($fout, "#!/bin/sh\n\n"); - fwrite($fout, "/usr/local/bin/ntop -u root -d --ipv4 -M\n\n"); + fwrite($fout, "/usr/local/bin/ntop -i " . $_POST['iface'] . " -u root -d --ipv4 -M\n\n"); fclose($fout); system("chmod 555 /usr/local/etc/rc.d/ntop.sh"); -- cgit v1.2.3