aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/ntop/ntop.xml49
-rw-r--r--pkg_config.xml9
2 files changed, 58 insertions, 0 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml
new file mode 100644
index 00000000..23175507
--- /dev/null
+++ b/packages/ntop/ntop.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<packagegui>
+ <name>ntop</name>
+ <donotsave>true</donotsave>
+ <preoutput>yes</preoutput>
+ <savetext>Change</savetext>
+ <!-- Menu is where this packages menu will appear -->
+ <menu>
+ <name>NTop</name>
+ <tooltiptext>ntop is a network probe that shows network usage in a way similar to what top does for processes. In interactive mode, it displays the network status on the user's terminal. In Web mode, it acts as a Web server, creating an HTML dump of the network status. It sports a NetFlow/sFlow emitter/collector, an HTTP-based client interface for creating ntop-centric monitoring applications, and RRD for persistently storing traffic statistics.</tooltiptext>
+ <section>Diagnostics</section>
+ </menu>
+ <!-- Do not save invokes a simple input menu and will not update
+ the configuration database. -->
+ <fields>
+ <field>
+ <fielddescr>NTOP Admin Password</fielddescr>
+ <fieldname>password</fieldname>
+ <description>Enter the password for the NTOP Web GUI. Minimum 5 characters.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>NTOP Admin Password AGAIN</fielddescr>
+ <fieldname>passwordagain</fieldname>
+ <type>input</type>
+ </field>
+ </fields>
+ <custom_add_php_command>
+ 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 {
+ echo "Passwords do not match!";
+ exit;
+ }
+ </custom_add_php_command>
+ <custom_deinstall_php_command>
+ mwexec("/usr/bin/killall ntop");
+ </custom_deinstall_php_command>
+ <custom_php_install_command>
+ 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");
+ fclose($fout);
+ system("chmod 555 /usr/local/etc/rc.d/ntop.sh");
+ </custom_php_install_command>
+</packagegui> \ No newline at end of file
diff --git a/pkg_config.xml b/pkg_config.xml
index a1f1cb7f..2e812d4b 100644
--- a/pkg_config.xml
+++ b/pkg_config.xml
@@ -33,5 +33,14 @@
<config_file>http://www.pfsense.com/packages/config/nmap.xml</config_file>
<configurationfile>nmap.xml</configurationfile>
</package>
+ <package>
+ <name>ntop</name>
+ <descr>ntop is a network probe that shows network usage in a way similar to what top does for processes. In interactive mode, it displays the network status on the user's terminal. In Web mode, it acts as a Web server, creating an HTML dump of the network status. It sports a NetFlow/sFlow emitter/collector, an HTTP-based client interface for creating ntop-centric monitoring applications, and RRD for persistently storing traffic statistics.</descr>
+ <category>Network Management</category>
+ <depends_on_package_base_url>http://www.pfsense.com/packages/All</depends_on_package_base_url>
+ <depends_on_package>ntop.tbz</depends_on_package>
+ <config_file>http://www.pfsense.com/packages/config/ntop.xml</config_file>
+ <configurationfile>ntop.xml</configurationfile>
+ </package>
</packages>
</pfsensepkgs>