backup, disable cron when not enabled. closes https://github.com/opnsense/core/issues/3430

This commit is contained in:
Ad Schellevis 2019-04-19 11:06:50 +02:00
parent 248156f8ee
commit 2e896d47b3

View File

@ -201,7 +201,12 @@ function core_cron()
}
}
$jobs[]['autocron'] = array('configctl system remote backup', 0, 1);
foreach ((new OPNsense\Backup\BackupFactory())->listProviders() as $classname => $provider) {
if ($provider['handle']->isEnabled()) {
$jobs[]['autocron'] = array('configctl system remote backup', 0, 1);
break;
}
}
return $jobs;
}