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
2835c174
Commit
2835c174
authored
Feb 25, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Mar 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename execute_unbound_command -> unbound_execute
(cherry picked from commit
9494ef66
)
parent
f62ad589
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
unbound.inc
src/etc/inc/unbound.inc
+10
-10
No files found.
src/etc/inc/unbound.inc
View file @
2835c174
...
...
@@ -382,7 +382,7 @@ EOF;
file_put_contents
(
"
{
$g
[
'unbound_chroot_path'
]
}
/remotecontrol.conf"
,
$remotcfg
);
// Generate our keys
execute_unbound_command
(
"unbound-control-setup"
);
unbound_execute
(
"unbound-control-setup"
);
}
}
...
...
@@ -422,17 +422,17 @@ function sync_unbound_service()
bootstrap_unbound_root
();
// Configure our Unbound service
execute_unbound_command
(
"unbound-anchor"
);
unbound_execute
(
"unbound-anchor"
);
unbound_remote_control_setup
();
unbound_generate_config
();
execute_unbound_command
(
"start"
);
unbound_execute
(
"start"
);
if
(
is_process_running
(
'unbound'
))
{
execute_unbound_command
(
"restore_cache"
);
unbound_execute
(
"restore_cache"
);
}
}
// Execute commands as the user unbound
function
execute_unbound_command
(
$cmd
)
function
unbound_execute
(
$cmd
)
{
global
$g
,
$config
;
...
...
@@ -604,31 +604,31 @@ function unbound_control($action) {
// Start Unbound
if
(
$config
[
'unbound'
][
'enable'
]
==
"on"
)
{
if
(
!
is_process_running
(
"unbound"
))
{
execute_unbound_command
(
"start"
);
unbound_execute
(
"start"
);
}
}
break
;
case
"stop"
:
if
(
$config
[
'unbound'
][
'enable'
]
==
"on"
)
{
execute_unbound_command
(
"stop"
);
unbound_execute
(
"stop"
);
}
break
;
case
"reload"
:
if
(
$config
[
'unbound'
][
'enable'
]
==
"on"
)
{
execute_unbound_command
(
"reload"
);
unbound_execute
(
"reload"
);
}
break
;
case
"dump_cache"
:
// Dump Unbound's Cache
if
(
$config
[
'unbound'
][
'dumpcache'
]
==
"on"
)
{
execute_unbound_command
(
"dump_cache"
);
unbound_execute
(
"dump_cache"
);
}
break
;
case
"restore_cache"
:
// Restore Unbound's Cache
if
((
is_process_running
(
"unbound"
))
&&
(
$config
[
'unbound'
][
'dumpcache'
]
==
"on"
))
{
if
(
file_exists
(
$cache_dumpfile
)
&&
filesize
(
$cache_dumpfile
)
>
0
)
{
execute_unbound_command
(
"load_cache < /tmp/unbound_cache"
);
unbound_execute
(
"load_cache < /tmp/unbound_cache"
);
}
}
break
;
...
...
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