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
8ff7c87f
Commit
8ff7c87f
authored
Apr 25, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cron: expose configure_cron() instead if invoking it multiple times #911
parent
5e97c86d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
services.inc
src/etc/inc/services.inc
+0
-1
upgrade_config.inc
src/etc/inc/upgrade_config.inc
+1
-0
diag_backup.php
src/www/diag_backup.php
+3
-3
system_advanced_firewall.php
src/www/system_advanced_firewall.php
+2
-0
system_advanced_misc.php
src/www/system_advanced_misc.php
+4
-3
No files found.
src/etc/inc/services.inc
View file @
8ff7c87f
...
...
@@ -2432,7 +2432,6 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont
write_config
(
sprintf
(
gettext
(
"Removed cron job for %s"
),
$command
));
}
}
configure_cron
();
}
/**
...
...
src/etc/inc/upgrade_config.inc
View file @
8ff7c87f
...
...
@@ -3122,6 +3122,7 @@ function upgrade_098_to_099() {
function
upgrade_099_to_100
()
{
install_cron_job
(
"newsyslog"
,
false
);
configure_cron
();
}
function
upgrade_100_to_101
()
...
...
src/www/diag_backup.php
View file @
8ff7c87f
...
...
@@ -444,11 +444,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
write_config
();
// test / perform backup
try
{
$filesInBackup
=
backup_to_google_drive
()
;
$filesInBackup
=
backup_to_google_drive
();
$cron_job
=
"/usr/local/opnsense/scripts/remote_backup.php"
;
if
(
!
cron_job_exists
(
$cron_job
))
{
// initial cron job install
install_cron_job
(
$cron_job
,
true
,
0
,
1
);
install_cron_job
(
$cron_job
,
true
,
0
,
1
);
configure_cron
(
);
}
}
catch
(
Exception
$e
)
{
$filesInBackup
=
array
()
;
...
...
src/www/system_advanced_firewall.php
View file @
8ff7c87f
...
...
@@ -224,6 +224,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
case
'monthly'
:
default
:
install_cron_job
(
"/usr/local/etc/rc.update_bogons"
,
true
,
"1"
,
"3"
,
"1"
,
"*"
,
"*"
);
break
;
}
$config
[
'system'
][
'bogons'
][
'interval'
]
=
$pconfig
[
'bogonsinterval'
];
}
...
...
@@ -237,6 +238,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$savemsg
=
get_std_save_message
();
configure_cron
();
filter_configure
();
}
}
...
...
src/www/system_advanced_misc.php
View file @
8ff7c87f
...
...
@@ -47,19 +47,19 @@ function install_backup_cron_jobs()
if
(
!
empty
(
$config
[
'system'
][
'rrdbackup'
]))
{
install_cron_job
(
"/usr/local/etc/rc.backup_rrd"
,
(
$config
[
'system'
][
'rrdbackup'
]
>
0
),
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'rrdbackup'
]
}
"
);
}
else
{
install_cron_job
(
"/usr/local/etc/rc.backup_rrd"
,
false
,
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'rrdbackup'
]
}
"
);
install_cron_job
(
'/usr/local/etc/rc.backup_rrd'
,
false
);
}
if
(
!
empty
(
$config
[
'system'
][
'dhcpbackup'
]))
{
install_cron_job
(
"/usr/local/etc/rc.backup_dhcpleases"
,
(
$config
[
'system'
][
'dhcpbackup'
]
>
0
),
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'dhcpbackup'
]
}
"
);
}
else
{
install_cron_job
(
"/usr/local/etc/rc.backup_dhcpleases"
,
false
,
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'dhcpbackup'
]
}
"
);
install_cron_job
(
'/usr/local/etc/rc.backup_dhcpleases'
,
false
);
}
if
(
!
empty
(
$config
[
'system'
][
'netflowbackup'
]))
{
install_cron_job
(
"/usr/local/etc/rc.backup_netflow"
,
(
$config
[
'system'
][
'netflowbackup'
]
>
0
),
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'netflowbackup'
]
}
"
);
}
else
{
install_cron_job
(
"/usr/local/etc/rc.backup_netflow"
,
false
,
$minute
=
"0"
,
"*/
{
$config
[
'system'
][
'netflowbackup'
]
}
"
);
install_cron_job
(
'/usr/local/etc/rc.backup_netflow'
,
false
);
}
}
...
...
@@ -236,6 +236,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
system_resolvconf_generate
(
true
);
install_backup_cron_jobs
();
configure_cron
();
filter_configure
();
activate_powerd
();
load_crypto_module
();
...
...
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