From 3dc5d11da5557869f6fdfb4937f26186b19cdfb4 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 14 Nov 2015 14:01:25 +0100 Subject: ntop - package fixes and cleanups - Split PHP code to an inc file - Make it possible to disable ntop without uninstalling - Add Keep Data/Settings feature - Fix flipped 'Allow merging interfaces' meaning - Add privileges configuration - Code style cleanups --- config/ntop2/ntop.xml | 162 ++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 91 deletions(-) (limited to 'config/ntop2') diff --git a/config/ntop2/ntop.xml b/config/ntop2/ntop.xml index 6ba86525..5aab1e53 100644 --- a/config/ntop2/ntop.xml +++ b/config/ntop2/ntop.xml @@ -1,28 +1,31 @@ - - + + ntop - 3.0 + 2.3.2 Diagnostics: ntop Settings - Change - pkg_edit.php?xml=ntop.xml&id=0 + /usr/local/pkg/ntop.inc + + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/ntop2/ntop.inc + + + /etc/inc/priv/ + https://packages.pfsense.org/packages/config/ntop2/ntop.priv.inc + + pkg_edit.php?xml=ntop.xml ntop Settings - Set ntop settings such as password and port.
Diagnostics
- /pkg_edit.php?xml=ntop.xml&id=0 + /pkg_edit.php?xml=ntop.xml
ntop @@ -60,12 +70,12 @@ ntop ntop.sh ntop - NTOP bandwidth monitoring/graphing + NTOP Network Traffic Monitor - ntop Settings - /pkg_edit.php?xml=ntop.xml&id=0 + Settings + /pkg_edit.php?xml=ntop.xml @@ -74,16 +84,38 @@ + + Enable ntop + enable + Check this to enable ntop. + checkbox + + + Keep Data/Settings + keepdata + + + Note: If 'Keep Data/Settings' is disabled, all settings and data will be wiped on package uninstall/reinstall/upgrade! + ]]> + + checkbox + on + ntop Admin Password password - Enter the password for the NTOP Web GUI. Minimum 5 characters. + Enter the password for the NTOP Web GUI. Minimum 5 characters. password + true + 20 - ntop Admin Password AGAIN + Confirm ntop Admin Password passwordagain password + true + 20 Interface @@ -92,82 +124,30 @@ 3 lan true + loopback - Allow merging interfaces<br>(Def: Do not merge) - allowmerge + Disallow merging interfaces + disallowmerge + + + Use this option to keep traffic separate by interface. (Default: Disabled) + ]]> + checkbox - - "ntop.sh", - "start" => $start, - "stop" => "/usr/bin/killall ntop" - ) - ); - if (is_service_running("ntop")) { - stop_service("ntop"); - // Wait for ntop to shut down cleanly. - sleep(20); - } - if (empty($ntop_config['password'])) - $ntop_config['password'] = "admin"; - unlink_if_exists("/var/db/ntop/ntop_pw.db"); - exec("/usr/local/bin/ntop --set-admin-password={$ntop_config['password']}"); - sleep(2); - start_service("ntop"); - conf_mount_ro(); - } - ]]> - - - sync_package_ntop(); - + + ntop_php_install_command(); + + + ntop_php_deinstall_command(); + sync_package_ntop(); - - sync_package_ntop(); - - + ntop_validate_input($_POST, $input_errors); -- cgit v1.2.3