mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
plugins: repair #1483
This commit is contained in:
parent
29490c8df4
commit
51fea877de
@ -43,9 +43,9 @@ function dyndns_configure()
|
||||
|
||||
function dyndns_cron()
|
||||
{
|
||||
$jobs = array('autocron' => array());
|
||||
$jobs = array();
|
||||
|
||||
$jobs['autocron'][] = array('/usr/local/etc/rc.dyndns.update', '11', '1');
|
||||
$jobs[]['autocron'] = array('/usr/local/etc/rc.dyndns.update', '11', '1');
|
||||
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
@ -53,12 +53,12 @@ function pf_cron()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$jobs = array('autocron' => array());
|
||||
$jobs = array();
|
||||
|
||||
if (isset($config['filter']['rule'])) {
|
||||
foreach ($config['filter']['rule'] as $rule) {
|
||||
if (!empty($rule['sched'])) {
|
||||
$jobs['autocron'][] = array('/usr/local/etc/rc.filter_configure', '0,15,30,45');
|
||||
$jobs[]['autocron'] = array('/usr/local/etc/rc.filter_configure', '0,15,30,45');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,11 +38,21 @@ function rfc2136_configure()
|
||||
);
|
||||
}
|
||||
|
||||
function rfc2136_enabled()
|
||||
{
|
||||
global $config;
|
||||
|
||||
/* XXX not entirely correct */
|
||||
return isset($config['dnsupdates']['dnsupdate']);
|
||||
}
|
||||
|
||||
function rfc2136_cron()
|
||||
{
|
||||
$jobs = array('autocron' => array());
|
||||
$jobs = array();
|
||||
|
||||
$jobs['autocron'][] = array('/usr/local/etc/rc.rfc2136.update', '16', '1');
|
||||
if (rfc2136_enabled()) {
|
||||
$jobs[]['autocron'] = array('/usr/local/etc/rc.rfc2136.update', '16', '1');
|
||||
}
|
||||
|
||||
return $jobs;
|
||||
}
|
||||
@ -51,7 +61,7 @@ function rfc2136_configure_do($verbose = false, $int = '', $updatehost = '', $fo
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (!isset($config['dnsupdates']['dnsupdate'])) {
|
||||
if (!rfc_2136_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -74,12 +84,13 @@ function rfc2136_configure_do($verbose = false, $int = '', $updatehost = '', $fo
|
||||
$if = get_real_interface($dnsupdate['interface']);
|
||||
|
||||
if (isset($dnsupdate['usepublicip'])) {
|
||||
$wanip = get_dyndns_ip($dnsupdate['interface']);
|
||||
$wanip = get_dyndns_ip($dnsupdate['interface'], 4);
|
||||
$wanipv6 = get_dyndns_ip($dnsupdate['interface'], 6);
|
||||
} else {
|
||||
$wanip = get_interface_ip($dnsupdate['interface']);
|
||||
$wanipv6 = get_interface_ipv6($dnsupdate['interface']);
|
||||
}
|
||||
|
||||
$wanipv6 = get_interface_ipv6($dnsupdate['interface']);
|
||||
$cacheFile = "/conf/dyndns_{$dnsupdate['interface']}_rfc2136_" . escapeshellarg($dnsupdate['host']) . "_{$dnsupdate['server']}.cache";
|
||||
$currentTime = time();
|
||||
|
||||
|
||||
@ -1589,9 +1589,7 @@ function system_cron_configure($verbose = false)
|
||||
* and conquer the code bits... :)
|
||||
*/
|
||||
if (!empty($cron_plugin['autocron'])) {
|
||||
foreach ($cron_plugin['autocron'] as $cron_job) {
|
||||
$autocron[] = call_user_func_array('generate_cron_job', $cron_job);
|
||||
}
|
||||
$autocron[] = call_user_func_array('generate_cron_job', $cron_plugin['autocron']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user