Add import param to keep conf in handler

This commit is contained in:
Xavier Guimard 2016-03-24 06:23:38 +00:00
parent fe842d59c9
commit a5424c6068
2 changed files with 12 additions and 0 deletions

View File

@ -11,6 +11,14 @@ use constant SKIP => 2;
our $VERSION = '2.0.0';
our $keepConf = 0;
sub import {
if($_[1] eq 'keepConf') {
$keepConf = 1;
}
}
# CONFIGURATION UPDATE
## @rmethod protected int checkConf(boolean force)
@ -47,6 +55,9 @@ sub checkConf {
$class->configReload($conf);
}
$class->lmLog( "$class: configuration is up to date", 'debug' );
if($keepConf){
$class->lmConf($conf);
}
return 1;
}

View File

@ -14,6 +14,7 @@ our $_tshv = {
lastCheck => 0,
checkTime => 600,
confAcc => {},
lmConf => {},
localConfig => {},
logLevel => 'notice',
_logLevel => 2,