aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-15 00:03:56 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-15 00:03:56 +0200
commit0a9a28c5d355b9737fb0657737ab5121594d8130 (patch)
tree6f64c658206f7fde072ca17c03ae54129e47947d
parenta68395e1c0b7b3a8ecd2d41e7b604afa7f61c0a8 (diff)
downloadpfsense-packages-0a9a28c5d355b9737fb0657737ab5121594d8130.tar.gz
pfsense-packages-0a9a28c5d355b9737fb0657737ab5121594d8130.tar.bz2
pfsense-packages-0a9a28c5d355b9737fb0657737ab5121594d8130.zip
Only (re)start ntopng after GeoIP update if not (re)installing the package
Also, use $post consistently in topng_validate_input().
-rw-r--r--config/ntopng/ntopng.inc17
1 files changed, 10 insertions, 7 deletions
diff --git a/config/ntopng/ntopng.inc b/config/ntopng/ntopng.inc
index 1f1c737a..27b484c1 100644
--- a/config/ntopng/ntopng.inc
+++ b/config/ntopng/ntopng.inc
@@ -173,7 +173,7 @@ function ntopng_sync_package() {
start_service("ntopng");
sleep(20);
}
- } elseif (!($g['booting'])) {
+ } elseif (!($g['booting'])) {
ntopng_services_stop();
if ($ntopng_config['enable'] == "on") {
start_service("ntopng");
@@ -273,10 +273,13 @@ function ntopng_update_geoip() {
ntopng_fixup_geoip();
- $ntopng_config = $config['installedpackages']['ntopng']['config'][0];
- ntopng_services_stop();
- if ($ntopng_config['enable'] == "on") {
- start_service("ntopng");
+ /* Do not (re)start services on package (re)install, only on manual GeoIP updates via the GUI */
+ if ($_POST['Submit'] == "Update GeoIP Data") {
+ $ntopng_config = $config['installedpackages']['ntopng']['config'][0];
+ ntopng_services_stop();
+ if ($ntopng_config['enable'] == "on") {
+ start_service("ntopng");
+ }
}
}
@@ -351,10 +354,10 @@ function ntopng_flush_historical_data() {
}
function ntopng_validate_input($post, &$input_errors) {
- if (empty($_POST['redis_password']) || empty($_POST['redis_passwordagain'])) {
+ if (empty($post['redis_password']) || empty($post['redis_passwordagain'])) {
$input_errors[] = "You must provide (and confirm) ntopng's password.";
}
- if ((strlen($_POST['redis_password']) < 5) || (strlen($_POST['redis_passwordagain']) < 5)) {
+ if ((strlen($post['redis_password']) < 5) || (strlen($post['redis_passwordagain']) < 5)) {
$input_errors[] = "Password must have at least 5 characters.";
}
if ($post['redis_password'] != $post['redis_passwordagain']) {