aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-22 16:47:32 -0400
committerjim-p <jimp@pfsense.org>2011-06-22 16:47:32 -0400
commit0f2c5525529626345bcfd89dfe86dd69eb4d616b (patch)
treea1ee4dcde0c112c77e8e0aa8f24a11a82176f522 /config
parentda04dfed18223d4fbe2bc9a78b833080a74fe91c (diff)
downloadpfsense-packages-0f2c5525529626345bcfd89dfe86dd69eb4d616b.tar.gz
pfsense-packages-0f2c5525529626345bcfd89dfe86dd69eb4d616b.tar.bz2
pfsense-packages-0f2c5525529626345bcfd89dfe86dd69eb4d616b.zip
Fix ntop password reset.
Diffstat (limited to 'config')
-rw-r--r--config/ntop2/ntop.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/config/ntop2/ntop.xml b/config/ntop2/ntop.xml
index 6cd71d60..f0c3ed61 100644
--- a/config/ntop2/ntop.xml
+++ b/config/ntop2/ntop.xml
@@ -142,12 +142,16 @@
"stop" => "/usr/bin/killall ntop"
)
);
- stop_service("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";
- sleep(5);
unlink_if_exists("/var/db/ntop/ntop_pw.db");
- exec("/usr/local/bin/ntop --set-admin-password={$ntop_config['password']});
+ exec("/usr/local/bin/ntop --set-admin-password={$ntop_config['password']}");
+ sleep(2);
start_service("ntop");
conf_mount_ro();
config_unlock();