mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #1407 from phil-davis/patch-1
This commit is contained in:
commit
16d2c13aa6
@ -2363,6 +2363,7 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
|
||||
global $config, $g;
|
||||
|
||||
$is_installed = false;
|
||||
$cron_changed = true;
|
||||
|
||||
if (!is_array($config['cron']))
|
||||
$config['cron'] = array();
|
||||
@ -2391,8 +2392,13 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
|
||||
$config['cron']['item'][] = $cron_item;
|
||||
write_config(sprintf(gettext("Installed cron job for %s"), $command));
|
||||
} else {
|
||||
$config['cron']['item'][$x] = $cron_item;
|
||||
write_config(sprintf(gettext("Updated cron job for %s"), $command));
|
||||
if ($config['cron']['item'][$x] == $cron_item) {
|
||||
$cron_changed = false;
|
||||
log_error(sprintf(gettext("Checked cron job for %s, no change needed"), $command));
|
||||
} else {
|
||||
$config['cron']['item'][$x] = $cron_item;
|
||||
write_config(sprintf(gettext("Updated cron job for %s"), $command));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($is_installed == true) {
|
||||
@ -2400,7 +2406,9 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
|
||||
write_config(sprintf(gettext("Removed cron job for %s"), $command));
|
||||
}
|
||||
}
|
||||
configure_cron();
|
||||
|
||||
if ($cron_changed)
|
||||
configure_cron();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user