From 73c409dcdc484d4bd167f92eeea8c63915e589e0 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Tue, 23 Feb 2016 09:10:56 +1100 Subject: [PATCH] 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) --- daily.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/daily.php b/daily.php index cc91d132da..7e42c4066d 100644 --- a/daily.php +++ b/daily.php @@ -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') {