From 86cfb9e1cc5339d93381f56409d65c2731a74cbc Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 16 May 2011 09:01:50 -0400 Subject: Fix whitespace, loading config at reinstall/bootup. --- config/ntop2/ntop.xml | 131 ++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 62 deletions(-) (limited to 'config/ntop2') diff --git a/config/ntop2/ntop.xml b/config/ntop2/ntop.xml index f794b1d0..eff70ae3 100644 --- a/config/ntop2/ntop.xml +++ b/config/ntop2/ntop.xml @@ -3,39 +3,40 @@ - + ]]> ntop 3.0 @@ -91,51 +92,57 @@ lan true - + + "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(); + } + 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(); -- cgit v1.2.3