diff options
Diffstat (limited to 'packages/ntop/ntop.xml')
-rw-r--r-- | packages/ntop/ntop.xml | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml index 267dc4b0..a398a4f8 100644 --- a/packages/ntop/ntop.xml +++ b/packages/ntop/ntop.xml @@ -51,8 +51,10 @@ </field> <field> <fielddescr>Interface</fielddescr> - <fieldname>iface</fieldname> + <fieldname>interface_array</fieldname> <value>lan</value> + <multiple>true</multiple> + <size>3</size> <type>interfaces_selection</type> </field> </fields> @@ -64,16 +66,18 @@ global $input_errors; $ntop_config =& $_POST; $if_final = ""; + $ifaces_final = ""; if($ntop_config['password'] and $ntop_config['passwordagain']) { if($ntop_config['password'] == $ntop_config['passwordagain']) { - $ifaces = $ntop_config['iface']; - $lan = $config['interfaces']['lan']['if']; - $if_final .= convert_friendly_interface_to_real_interface_name($if); - if(!$if_final) { - $if_final = $lan; - } + foreach($_POST['interface_array'] as $iface) { + $if = convert_friendly_interface_to_real_interface_name($iface); + echo $if; + if($if) { + $ifaces_final .= $if . " "; + } + } exec("/usr/local/bin/ntop --set-admin-password=" . $_POST['password'] . " &", $ntopout); - $start = "/usr/local/bin/ntop -i " . $if_final . " -u root -d --ipv4 -M -x 8102 -X 8192 &"; + $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, |