mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +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");
|
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;
|
my $cron_text = $1;
|
||||||
chomp ($cron_text);
|
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)) {
|
if (cron_check_syntax($cron_text)) {
|
||||||
$module->{'cron'} = $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*$/) {
|
} elsif ($line =~ /^\s*module_end\s*$/) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user