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
e2276435
Commit
e2276435
authored
Jun 08, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gateways: set monitoring off by default; fixes #2
parent
ae07d41a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
35 deletions
+4
-35
gwlb.inc
src/etc/inc/gwlb.inc
+2
-7
system_advanced_misc.php
src/www/system_advanced_misc.php
+0
-28
system_gateways_edit.php
src/www/system_gateways_edit.php
+2
-0
No files found.
src/etc/inc/gwlb.inc
View file @
e2276435
...
@@ -63,18 +63,11 @@ function setup_gateways_monitor()
...
@@ -63,18 +63,11 @@ function setup_gateways_monitor()
return
;
return
;
}
}
$apinger_debug
=
""
;
if
(
isset
(
$config
[
'system'
][
'apinger_debug'
]))
{
$apinger_debug
=
"debug on"
;
}
$apinger_default
=
return_apinger_defaults
();
$apinger_default
=
return_apinger_defaults
();
$apingerconfig
=
<<<EOD
$apingerconfig
=
<<<EOD
# OPNsense apinger configuration file. Automatically Generated!
# OPNsense apinger configuration file. Automatically Generated!
{$apinger_debug}
## User and group the pinger should run as
## User and group the pinger should run as
user "root"
user "root"
group "wheel"
group "wheel"
...
@@ -600,6 +593,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
...
@@ -600,6 +593,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
$gateway
[
'monitor'
]
=
$gateway
[
'gateway'
];
$gateway
[
'monitor'
]
=
$gateway
[
'gateway'
];
$gateway
[
'descr'
]
=
"Interface
{
$friendly
}{
$ctype
}
Gateway"
;
$gateway
[
'descr'
]
=
"Interface
{
$friendly
}{
$ctype
}
Gateway"
;
$gateway
[
'monitor_disable'
]
=
true
;
$gateways_arr
[
$gateway
[
'name'
]]
=
$gateway
;
$gateways_arr
[
$gateway
[
'name'
]]
=
$gateway
;
}
}
unset
(
$gateway
);
unset
(
$gateway
);
...
@@ -684,6 +678,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
...
@@ -684,6 +678,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
$gateway
[
'monitor'
]
=
$gateway
[
'gateway'
];
$gateway
[
'monitor'
]
=
$gateway
[
'gateway'
];
$gateway
[
'descr'
]
=
"Interface
{
$friendly
}{
$ctype
}
Gateway"
;
$gateway
[
'descr'
]
=
"Interface
{
$friendly
}{
$ctype
}
Gateway"
;
$gateway
[
'monitor_disable'
]
=
true
;
$gateways_arr
[
$gateway
[
'name'
]]
=
$gateway
;
$gateways_arr
[
$gateway
[
'name'
]]
=
$gateway
;
}
}
unset
(
$gateway
);
unset
(
$gateway
);
...
...
src/www/system_advanced_misc.php
View file @
e2276435
...
@@ -50,7 +50,6 @@ $pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
...
@@ -50,7 +50,6 @@ $pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
$pconfig
[
'schedule_states'
]
=
isset
(
$config
[
'system'
][
'schedule_states'
]);
$pconfig
[
'schedule_states'
]
=
isset
(
$config
[
'system'
][
'schedule_states'
]);
$pconfig
[
'kill_states'
]
=
isset
(
$config
[
'system'
][
'kill_states'
]);
$pconfig
[
'kill_states'
]
=
isset
(
$config
[
'system'
][
'kill_states'
]);
$pconfig
[
'skip_rules_gw_down'
]
=
isset
(
$config
[
'system'
][
'skip_rules_gw_down'
]);
$pconfig
[
'skip_rules_gw_down'
]
=
isset
(
$config
[
'system'
][
'skip_rules_gw_down'
]);
$pconfig
[
'apinger_debug'
]
=
isset
(
$config
[
'system'
][
'apinger_debug'
]);
$pconfig
[
'use_mfs_tmpvar'
]
=
isset
(
$config
[
'system'
][
'use_mfs_tmpvar'
]);
$pconfig
[
'use_mfs_tmpvar'
]
=
isset
(
$config
[
'system'
][
'use_mfs_tmpvar'
]);
$pconfig
[
'use_mfs_tmp_size'
]
=
$config
[
'system'
][
'use_mfs_tmp_size'
];
$pconfig
[
'use_mfs_tmp_size'
]
=
$config
[
'system'
][
'use_mfs_tmp_size'
];
$pconfig
[
'use_mfs_var_size'
]
=
$config
[
'system'
][
'use_mfs_var_size'
];
$pconfig
[
'use_mfs_var_size'
]
=
$config
[
'system'
][
'use_mfs_var_size'
];
...
@@ -185,19 +184,6 @@ if ($_POST) {
...
@@ -185,19 +184,6 @@ if ($_POST) {
unset
(
$config
[
'system'
][
'skip_rules_gw_down'
]);
unset
(
$config
[
'system'
][
'skip_rules_gw_down'
]);
}
}
$need_apinger_restart
=
false
;
if
(
$_POST
[
'apinger_debug'
]
==
"yes"
)
{
if
(
!
isset
(
$config
[
'system'
][
'apinger_debug'
]))
{
$need_apinger_restart
=
true
;
}
$config
[
'system'
][
'apinger_debug'
]
=
true
;
}
else
{
if
(
isset
(
$config
[
'system'
][
'apinger_debug'
]))
{
$need_apinger_restart
=
true
;
}
unset
(
$config
[
'system'
][
'apinger_debug'
]);
}
if
(
$_POST
[
'use_mfs_tmpvar'
]
==
"yes"
)
{
if
(
$_POST
[
'use_mfs_tmpvar'
]
==
"yes"
)
{
$config
[
'system'
][
'use_mfs_tmpvar'
]
=
true
;
$config
[
'system'
][
'use_mfs_tmpvar'
]
=
true
;
}
else
{
}
else
{
...
@@ -233,9 +219,6 @@ if ($_POST) {
...
@@ -233,9 +219,6 @@ if ($_POST) {
if
(
$need_relayd_restart
)
{
if
(
$need_relayd_restart
)
{
relayd_configure
();
relayd_configure
();
}
}
if
(
$need_apinger_restart
)
{
setup_gateways_monitor
();
}
}
}
}
}
...
@@ -553,17 +536,6 @@ endforeach; ?>
...
@@ -553,17 +536,6 @@ endforeach; ?>
"and the rule is not created when gateway is down"
);
?>
"and the rule is not created when gateway is down"
);
?>
</td>
</td>
</tr>
</tr>
<tr>
<td
width=
"22%"
valign=
"top"
class=
"vncell"
>
<?=
gettext
(
"Enable debugging messages of gateway monitoring daemon"
);
?>
</td>
<td
width=
"78%"
class=
"vtable"
>
<input
name=
"apinger_debug"
type=
"checkbox"
id=
"apinger_debug"
value=
"yes"
<?php
if
(
$pconfig
[
'apinger_debug'
])
{
echo
"checked=
\"
checked
\"
"
;
}
?>
/>
<br
/>
<?=
gettext
(
"By default, gateway monitoring does not log its error messages, "
.
"by toggling this setting the daemon would enable logging its messages to syslog."
);
?>
</td>
</tr>
<tr>
<tr>
<td
colspan=
"2"
valign=
"top"
class=
"listtopic"
>
<?=
gettext
(
"RAM Disk Settings (Reboot to Apply Changes)"
);
?>
</td>
<td
colspan=
"2"
valign=
"top"
class=
"listtopic"
>
<?=
gettext
(
"RAM Disk Settings (Reboot to Apply Changes)"
);
?>
</td>
</tr>
</tr>
...
...
src/www/system_gateways_edit.php
View file @
e2276435
...
@@ -89,6 +89,8 @@ if (isset($id) && $a_gateways[$id]) {
...
@@ -89,6 +89,8 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig
[
'descr'
]
=
$a_gateways
[
$id
][
'descr'
];
$pconfig
[
'descr'
]
=
$a_gateways
[
$id
][
'descr'
];
$pconfig
[
'attribute'
]
=
$a_gateways
[
$id
][
'attribute'
];
$pconfig
[
'attribute'
]
=
$a_gateways
[
$id
][
'attribute'
];
$pconfig
[
'disabled'
]
=
isset
(
$a_gateways
[
$id
][
'disabled'
]);
$pconfig
[
'disabled'
]
=
isset
(
$a_gateways
[
$id
][
'disabled'
]);
}
else
{
$pconfig
[
'monitor_disable'
]
=
true
;
}
}
if
(
isset
(
$_GET
[
'dup'
])
&&
is_numericint
(
$_GET
[
'dup'
]))
{
if
(
isset
(
$_GET
[
'dup'
])
&&
is_numericint
(
$_GET
[
'dup'
]))
{
...
...
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