Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
51fea877
Commit
51fea877
authored
Mar 19, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugins: repair #1483
parent
29490c8d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
dyndns.inc
src/etc/inc/plugins.inc.d/dyndns.inc
+2
-2
pf.inc
src/etc/inc/plugins.inc.d/pf.inc
+2
-2
rfc2136.inc
src/etc/inc/plugins.inc.d/rfc2136.inc
+16
-5
system.inc
src/etc/inc/system.inc
+1
-3
No files found.
src/etc/inc/plugins.inc.d/dyndns.inc
View file @
51fea877
...
...
@@ -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
;
}
...
...
src/etc/inc/plugins.inc.d/pf.inc
View file @
51fea877
...
...
@@ -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
;
}
}
...
...
src/etc/inc/plugins.inc.d/rfc2136.inc
View file @
51fea877
...
...
@@ -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
();
...
...
src/etc/inc/system.inc
View file @
51fea877
...
...
@@ -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'
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment