mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Accept module_crontab with whitespaces at the end of definition and be more verbose
Former-commit-id: 55bd4acb8acf9c90eed3b1820c7cd8fb30328841
This commit is contained in:
parent
3426b04924
commit
755b832851
@ -516,11 +516,18 @@ sub parse_conf_modules($) {
|
||||
log_message ('setup', "Invalid regular expression in intensive condition: $line");
|
||||
}
|
||||
}
|
||||
} elsif ($line =~ /^\s*module_crontab\s+(((\*|(\d+(-\d+){0,1}))\s*){5}).*$/) {
|
||||
} elsif ($line =~ /^\s*module_crontab\s+(.*)$/) {
|
||||
my $cron_text = $1;
|
||||
chomp ($cron_text);
|
||||
$cron_text =~ s/\s+$//;
|
||||
# Get module name if is already read.
|
||||
my $module_name_message = "";
|
||||
$module_name_message = " (module $module->{'name'})" if defined($module->{'name'});
|
||||
if (cron_check_syntax($cron_text)) {
|
||||
$module->{'cron'} = $cron_text;
|
||||
log_message('debug', "Cron '$module->{'cron'}' configured $module_name_message.");
|
||||
} else {
|
||||
log_message('setup', "Incorrect cron syntax '$cron_text'. This module$module_name_message will be executed always.");
|
||||
}
|
||||
} elsif ($line =~ /^\s*module_end\s*$/) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user