mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user