mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
system: use configctl -d for cron-based services
Avoids waiting for a response that is not necessary because it won't be read and also spurious timeout messages in the backend log.
This commit is contained in:
parent
8a2aba56e1
commit
769605aef6
@ -169,7 +169,7 @@ function core_cron()
|
||||
$jobs[]['autocron'] = array('/usr/local/etc/rc.expireaccounts', '3');
|
||||
$jobs[]['autocron'] = array('/usr/local/opnsense/scripts/syslog/log_archive ', '4');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/ping_hosts.sh', '*/4');
|
||||
$jobs[]['autocron'] = array('configctl firmware changelog cron', '0', '22');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d firmware changelog cron', '0', '22');
|
||||
|
||||
if (!empty($config['system']['rrdbackup']) && $config['system']['rrdbackup'] > 0) {
|
||||
$jobs[]['autocron'] = array(
|
||||
@ -206,10 +206,10 @@ function core_cron()
|
||||
if (!empty($config['system']['dhparamusage'])) {
|
||||
switch ($config['system']['dhparamusage']) {
|
||||
case 'weekly':
|
||||
$jobs[]['autocron'] = array('configctl system ssl dhparam', '30', '3', '*', '*', '0');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d system ssl dhparam', '30', '3', '*', '*', '0');
|
||||
break;
|
||||
case 'monthly':
|
||||
$jobs[]['autocron'] = array('configctl system ssl dhparam', '30', '3', '1', '*', '*');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d system ssl dhparam', '30', '3', '1', '*', '*');
|
||||
break;
|
||||
default:
|
||||
/* cron job operated by user manually or RFC 7919 */
|
||||
@ -219,7 +219,7 @@ function core_cron()
|
||||
|
||||
foreach ((new OPNsense\Backup\BackupFactory())->listProviders() as $classname => $provider) {
|
||||
if ($provider['handle']->isEnabled()) {
|
||||
$jobs[]['autocron'] = array('configctl system remote backup', 0, 1);
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d system remote backup', 0, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,14 +65,14 @@ function pf_cron()
|
||||
/* bogons fetch always set in default config.xml */
|
||||
switch ($config['system']['bogons']['interval']) {
|
||||
case 'daily':
|
||||
$jobs[]['autocron'] = array('configctl filter schedule bogons', '1', '3', '*', '*', '*');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d filter schedule bogons', '1', '3', '*', '*', '*');
|
||||
break;
|
||||
case 'weekly':
|
||||
$jobs[]['autocron'] = array('configctl filter schedule bogons', '1', '3', '*', '*', '0');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d filter schedule bogons', '1', '3', '*', '*', '0');
|
||||
break;
|
||||
case 'monthly':
|
||||
default:
|
||||
$jobs[]['autocron'] = array('configctl filter schedule bogons', '1', '3', '1', '*', '*');
|
||||
$jobs[]['autocron'] = array('/usr/local/sbin/configctl -d filter schedule bogons', '1', '3', '1', '*', '*');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
||||
{% for job in helpers.toList('OPNsense.cron.jobs.job') %}
|
||||
{% if job.enabled|default('0') == '1' %}
|
||||
# Origin/Description: {{job.origin}}/{{job.description}}
|
||||
{{job.minutes}} {{job.hours}} {{job.days}} {{job.months}} {{job.weekdays}} /usr/local/sbin/configctl {{job.command}} {{job.parameters}}
|
||||
{{job.minutes}} {{job.hours}} {{job.days}} {{job.months}} {{job.weekdays}} /usr/local/sbin/configctl -d {{job.command}} {{job.parameters}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user