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
8c9be5ca
Commit
8c9be5ca
authored
Apr 25, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cron: the bogon job; #911
parent
65882381
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
services.inc
src/etc/inc/services.inc
+16
-1
system_advanced_firewall.php
src/www/system_advanced_firewall.php
+0
-12
No files found.
src/etc/inc/services.inc
View file @
8c9be5ca
...
@@ -2349,12 +2349,13 @@ function configure_cron()
...
@@ -2349,12 +2349,13 @@ function configure_cron()
'/usr/local/etc/rc.backup_dhcpleases'
,
'/usr/local/etc/rc.backup_dhcpleases'
,
'/usr/local/etc/rc.backup_netflow'
,
'/usr/local/etc/rc.backup_netflow'
,
'/usr/local/etc/rc.backup_rrd'
,
'/usr/local/etc/rc.backup_rrd'
,
'/usr/local/etc/rc.update_bogons'
,
);
);
foreach
(
$obsoletes
as
$obsolete
)
{
foreach
(
$obsoletes
as
$obsolete
)
{
/*
/*
* Strip old cron jobs that we no longer save explicitly.
* Strip old cron jobs that we no longer save explicitly.
* This can be sa
v
ely removed on our final road to 17.1.
* This can be sa
f
ely removed on our final road to 17.1.
*/
*/
install_cron_job
(
$obsolete
,
false
);
install_cron_job
(
$obsolete
,
false
);
}
}
...
@@ -2373,6 +2374,20 @@ function configure_cron()
...
@@ -2373,6 +2374,20 @@ function configure_cron()
$autocron
[]
=
generate_cron_job
(
'/usr/local/etc/rc.backup_netflow'
,
$minute
=
'0'
,
'*/'
.
$config
[
'system'
][
'netflowbackup'
]);
$autocron
[]
=
generate_cron_job
(
'/usr/local/etc/rc.backup_netflow'
,
$minute
=
'0'
,
'*/'
.
$config
[
'system'
][
'netflowbackup'
]);
}
}
/* bogons fetch always set in default config.xml */
switch
(
$config
[
'system'
][
'bogons'
][
'interval'
])
{
case
'daily'
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"*"
,
"*"
,
"*"
);
break
;
case
'weekly'
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"*"
,
"*"
,
"0"
);
break
;
case
'monthly'
:
default
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"1"
,
"*"
,
"*"
);
break
;
}
$anchor
=
'# custom crontab entries'
;
$anchor
=
'# custom crontab entries'
;
/* preserve existing crontab entries */
/* preserve existing crontab entries */
...
...
src/www/system_advanced_firewall.php
View file @
8c9be5ca
...
@@ -214,18 +214,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
...
@@ -214,18 +214,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
if
(
$pconfig
[
'bogonsinterval'
]
!=
$config
[
'system'
][
'bogons'
][
'interval'
])
{
if
(
$pconfig
[
'bogonsinterval'
]
!=
$config
[
'system'
][
'bogons'
][
'interval'
])
{
switch
(
$pconfig
[
'bogonsinterval'
])
{
case
'daily'
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"*"
,
"*"
,
"*"
);
break
;
case
'weekly'
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"*"
,
"*"
,
"0"
);
break
;
case
'monthly'
:
default
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"1"
,
"*"
,
"*"
);
break
;
}
$config
[
'system'
][
'bogons'
][
'interval'
]
=
$pconfig
[
'bogonsinterval'
];
$config
[
'system'
][
'bogons'
][
'interval'
]
=
$pconfig
[
'bogonsinterval'
];
}
}
...
...
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