mirror of https://github.com/mikaku/Monitorix.git
added a logger message if 'max_historical_years' exceeds the maximum permitted of 5
This commit is contained in:
parent
c95a772d09
commit
977ab39b98
|
@ -477,10 +477,14 @@ if(!$config{global_zoom}) {
|
|||
logger("WARNING: the 'global_zoom' option is not valid or doesn't exist. Please consider upgrading your configuration file.");
|
||||
$config{global_zoom} = 1;
|
||||
}
|
||||
if(!$config{max_historic_years} || $config{max_historic_years} > 5) {
|
||||
logger("WARNING: the 'max_historic_years' option is not valid or doesn't exist. Please consider upgrading your configuration file.");
|
||||
if(!$config{max_historic_years}) {
|
||||
logger("WARNING: the 'max_historic_years' option doesn't exist. Please consider upgrading your configuration file.");
|
||||
$config{max_historic_years} = 1;
|
||||
}
|
||||
if($config{max_historic_years} > 5) {
|
||||
logger("WARNING: the 'max_historic_years' option exceeds the maximum years permitted (5).");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
logger("Ok, done.") unless !$options{d};
|
||||
|
||||
|
|
Loading…
Reference in New Issue