check if auto-updates are enabled before checking innodb settings (if they are disabled, this would still throw an alert to say innodb needs adjusting even though they arent wanted)

This commit is contained in:
Christopher Smith
2016-02-23 09:10:56 +11:00
parent 0a51c0500a
commit 73c409dcdc
+11 -12
View File
@@ -18,6 +18,10 @@ if (isset($options['d'])) {
}
if ($options['f'] === 'update') {
if (!$config['update']) {
exit(0);
}
$innodb_buffer = innodb_buffer_check();
if ($innodb_buffer['used'] > $innodb_buffer['size']) {
if (!empty($config['alert']['default_mail'])) {
@@ -39,19 +43,14 @@ The ' . $config['project_name'] . ' team.';
echo warn_innodb_buffer($innodb_buffer);
exit(2);
}
else {
if ($config['update']) {
if ($config['update_channel'] == 'master') {
exit(1);
}
elseif ($config['update_channel'] == 'release') {
exit(3);
}
}
else {
exit(0);
}
if ($config['update_channel'] == 'master') {
exit(1);
}
elseif ($config['update_channel'] == 'release') {
exit(3);
}
exit(0);
}
if ($options['f'] === 'syslog') {