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
9fb7a305
Commit
9fb7a305
authored
Dec 31, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: more migration of xmlrcp sync settings #1319
parent
2e44a885
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
68 deletions
+67
-68
plist
plist
+1
-0
dnsmasq.inc
src/etc/inc/plugins.inc.d/dnsmasq.inc
+13
-0
if_ipsec.inc
src/etc/inc/plugins.inc.d/if_ipsec.inc
+13
-0
if_openvpn.inc
src/etc/inc/plugins.inc.d/if_openvpn.inc
+13
-0
relayd.inc
src/etc/inc/plugins.inc.d/relayd.inc
+14
-1
unbound.inc
src/etc/inc/plugins.inc.d/unbound.inc
+13
-0
rc.filter_synchronize
src/etc/rc.filter_synchronize
+0
-6
system_hasync.php
src/www/system_hasync.php
+0
-61
No files found.
plist
View file @
9fb7a305
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
/usr/local/etc/inc/plugins.inc.d/squid.inc
/usr/local/etc/inc/plugins.inc.d/squid.inc
/usr/local/etc/inc/plugins.inc.d/suricata.inc
/usr/local/etc/inc/plugins.inc.d/suricata.inc
/usr/local/etc/inc/plugins.inc.d/unbound.inc
/usr/local/etc/inc/plugins.inc.d/unbound.inc
/usr/local/etc/inc/plugins.inc.d/wol.inc
/usr/local/etc/inc/rrd.inc
/usr/local/etc/inc/rrd.inc
/usr/local/etc/inc/services.inc
/usr/local/etc/inc/services.inc
/usr/local/etc/inc/squid.auth-user.php
/usr/local/etc/inc/squid.auth-user.php
...
...
src/etc/inc/plugins.inc.d/dnsmasq.inc
View file @
9fb7a305
...
@@ -55,6 +55,19 @@ function dnsmasq_services()
...
@@ -55,6 +55,19 @@ function dnsmasq_services()
return
$services
;
return
$services
;
}
}
function
dnsmasq_xmlrpc_sync
()
{
$result
=
array
();
$result
[]
=
array
(
'description'
=>
gettext
(
'DNS Forwarder'
),
'section'
=>
'dnsmasq'
,
'id'
=>
'dnsforwarder'
,
);
return
$result
;
}
function
dnsmasq_configure
()
function
dnsmasq_configure
()
{
{
/* XXX stub that prevents dnsmasq from starting again on bootup */
/* XXX stub that prevents dnsmasq from starting again on bootup */
...
...
src/etc/inc/plugins.inc.d/if_ipsec.inc
View file @
9fb7a305
...
@@ -97,3 +97,16 @@ function if_ipsec_interfaces()
...
@@ -97,3 +97,16 @@ function if_ipsec_interfaces()
return
$interfaces
;
return
$interfaces
;
}
}
function
if_ipsec_xmlrpc_sync
()
{
$result
=
array
();
$result
[]
=
array
(
'description'
=>
gettext
(
'IPsec'
),
'section'
=>
'ipsec'
,
'id'
=>
'ipsec'
,
);
return
$result
;
}
src/etc/inc/plugins.inc.d/if_openvpn.inc
View file @
9fb7a305
...
@@ -91,3 +91,16 @@ function if_openvpn_interfaces()
...
@@ -91,3 +91,16 @@ function if_openvpn_interfaces()
return
$interfaces
;
return
$interfaces
;
}
}
function
if_openvpn_xmlrpc_sync
()
{
$result
=
array
();
$result
[]
=
array
(
'description'
=>
gettext
(
'OpenVPN'
),
'section'
=>
'openvpn'
,
'id'
=>
'openvpn'
,
);
return
$result
;
}
src/etc/inc/plugins.inc.d/relayd.inc
View file @
9fb7a305
...
@@ -55,7 +55,7 @@ function relayd_services()
...
@@ -55,7 +55,7 @@ function relayd_services()
$pconfig
=
array
();
$pconfig
=
array
();
$pconfig
[
'name'
]
=
'relayd'
;
$pconfig
[
'name'
]
=
'relayd'
;
$pconfig
[
'description'
]
=
gettext
(
'
Server load balancing daemon
'
);
$pconfig
[
'description'
]
=
gettext
(
'
Relayd Load Balancer
'
);
$pconfig
[
'php'
][
'restart'
]
=
array
(
'relayd_configure_do'
);
$pconfig
[
'php'
][
'restart'
]
=
array
(
'relayd_configure_do'
);
$pconfig
[
'php'
][
'start'
]
=
array
(
'relayd_configure_do'
);
$pconfig
[
'php'
][
'start'
]
=
array
(
'relayd_configure_do'
);
$services
[]
=
$pconfig
;
$services
[]
=
$pconfig
;
...
@@ -63,6 +63,19 @@ function relayd_services()
...
@@ -63,6 +63,19 @@ function relayd_services()
return
$services
;
return
$services
;
}
}
function
relayd_xmlrpc_sync
()
{
$result
=
array
();
$result
[]
=
array
(
'description'
=>
gettext
(
'Relayd Load Balancer'
),
'section'
=>
'load_balancer'
,
'id'
=>
'lb'
,
);
return
$result
;
}
function
relayd_syslog
()
function
relayd_syslog
()
{
{
$logfacilities
=
array
();
$logfacilities
=
array
();
...
...
src/etc/inc/plugins.inc.d/unbound.inc
View file @
9fb7a305
...
@@ -55,6 +55,19 @@ function unbound_services()
...
@@ -55,6 +55,19 @@ function unbound_services()
return
$services
;
return
$services
;
}
}
function
unbound_xmlrpc_sync
()
{
$result
=
array
();
$result
[]
=
array
(
'description'
=>
gettext
(
'DNS Resolver'
),
'section'
=>
'unbound'
,
'id'
=>
'dnsresolver'
,
);
return
$result
;
}
function
unbound_configure
()
function
unbound_configure
()
{
{
/* XXX stub that prevents unbound from starting again on bootup */
/* XXX stub that prevents unbound from starting again on bootup */
...
...
src/etc/rc.filter_synchronize
View file @
9fb7a305
...
@@ -280,17 +280,11 @@ if (isset($config['hasync']) && is_array($config['hasync'])) {
...
@@ -280,17 +280,11 @@ if (isset($config['hasync']) && is_array($config['hasync'])) {
$section_cnf
[
'synchronizenat'
]
=
'nat'
;
$section_cnf
[
'synchronizenat'
]
=
'nat'
;
$section_cnf
[
'synchronizealiases'
]
=
'aliases'
;
$section_cnf
[
'synchronizealiases'
]
=
'aliases'
;
$section_cnf
[
'synchronizedhcpd'
]
=
'dhcpd'
;
$section_cnf
[
'synchronizedhcpd'
]
=
'dhcpd'
;
$section_cnf
[
'synchronizewol'
]
=
'wol'
;
$section_cnf
[
'synchronizestaticroutes'
]
=
'staticroutes,gateways'
;
$section_cnf
[
'synchronizestaticroutes'
]
=
'staticroutes,gateways'
;
$section_cnf
[
'synchronizevirtualip'
]
=
'virtualip'
;
$section_cnf
[
'synchronizevirtualip'
]
=
'virtualip'
;
$section_cnf
[
'synchronizelb'
]
=
'load_balancer'
;
$section_cnf
[
'synchronizeipsec'
]
=
'ipsec'
;
$section_cnf
[
'synchronizeopenvpn'
]
=
'openvpn'
;
$section_cnf
[
'synchronizecerts'
]
=
'cert,ca,crl'
;
$section_cnf
[
'synchronizecerts'
]
=
'cert,ca,crl'
;
$section_cnf
[
'synchronizeusers'
]
=
'system.user,system.group'
;
$section_cnf
[
'synchronizeusers'
]
=
'system.user,system.group'
;
$section_cnf
[
'synchronizeauthservers'
]
=
'system.authserver'
;
$section_cnf
[
'synchronizeauthservers'
]
=
'system.authserver'
;
$section_cnf
[
'synchronizednsforwarder'
]
=
'dnsmasq'
;
$section_cnf
[
'synchronizednsresolver'
]
=
'unbound'
;
$section_cnf
[
'synchronizeschedules'
]
=
'schedules'
;
$section_cnf
[
'synchronizeschedules'
]
=
'schedules'
;
if
(
function_exists
(
'plugins_xmlrpc_sync'
))
{
if
(
function_exists
(
'plugins_xmlrpc_sync'
))
{
...
...
src/www/system_hasync.php
View file @
9fb7a305
...
@@ -41,18 +41,12 @@ $checkbox_names = array(
...
@@ -41,18 +41,12 @@ $checkbox_names = array(
'synchronizeauthservers'
,
'synchronizeauthservers'
,
'synchronizecerts'
,
'synchronizecerts'
,
'synchronizedhcpd'
,
'synchronizedhcpd'
,
'synchronizednsforwarder'
,
'synchronizednsresolver'
,
'synchronizeipsec'
,
'synchronizelb'
,
'synchronizenat'
,
'synchronizenat'
,
'synchronizeopenvpn'
,
'synchronizerules'
,
'synchronizerules'
,
'synchronizeschedules'
,
'synchronizeschedules'
,
'synchronizestaticroutes'
,
'synchronizestaticroutes'
,
'synchronizeusers'
,
'synchronizeusers'
,
'synchronizevirtualip'
,
'synchronizevirtualip'
,
'synchronizewol'
,
);
);
$syncplugins
=
array
();
$syncplugins
=
array
();
...
@@ -277,25 +271,6 @@ include("head.inc");
...
@@ -277,25 +271,6 @@ include("head.inc");
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<td><a
id=
"help_for_synchronizeipsec"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'IPsec'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizeipsec"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizeipsec'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizeipsec"
>
<?=
gettext
(
'Automatically sync the IPsec configuration to the other HA host when changes are made.'
)
?>
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_synchronizeopenvpn"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'OpenVPN'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizeopenvpn"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizeopenvpn'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizeopenvpn"
>
<?=
gettext
(
'Automatically sync the OpenVPN configuration to the other HA host when changes are made.'
)
?>
<div
class=
"well well-sm"
><b>
<?=
gettext
(
'Using this option implies "Synchronize Certificates" as they are required for OpenVPN.'
)
?>
</b></div>
</div>
</td>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_synchronizedhcpd"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'DHCPD'
)
?>
</td>
<td><a
id=
"help_for_synchronizedhcpd"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'DHCPD'
)
?>
</td>
<td>
<td>
...
@@ -305,15 +280,6 @@ include("head.inc");
...
@@ -305,15 +280,6 @@ include("head.inc");
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<td><a
id=
"help_for_synchronizewol"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Wake on LAN'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizewol"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizewol'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizewol"
>
<?=
gettext
(
'Automatically sync the WoL configuration to the other HA host when changes are made.'
)
?>
</div>
</td>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_synchronizestaticroutes"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Static Routes'
)
?>
</td>
<td><a
id=
"help_for_synchronizestaticroutes"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Static Routes'
)
?>
</td>
<td>
<td>
...
@@ -323,15 +289,6 @@ include("head.inc");
...
@@ -323,15 +289,6 @@ include("head.inc");
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<td><a
id=
"help_for_synchronizelb"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Load Balancer'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizelb"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizelb'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizelb"
>
<?=
gettext
(
'Automatically sync the Load Balancer configuration to the other HA host when changes are made.'
)
?>
</div>
</td>
</tr>
<tr>
<tr>
<td><a
id=
"help_for_synchronizevirtualip"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Virtual IPs'
)
?>
</td>
<td><a
id=
"help_for_synchronizevirtualip"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Virtual IPs'
)
?>
</td>
<td>
<td>
...
@@ -341,24 +298,6 @@ include("head.inc");
...
@@ -341,24 +298,6 @@ include("head.inc");
</div>
</div>
</td>
</td>
</tr>
</tr>
<tr>
<td><a
id=
"help_for_synchronizednsforwarder"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'DNS Forwarder'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizednsforwarder"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizednsforwarder'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizednsforwarder"
>
<?=
gettext
(
'Automatically sync the DNS Forwarder configuration to the other HA host when changes are made.'
)
?>
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_synchronizednsresolver"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'DNS Resolver'
)
?>
</td>
<td>
<input
type=
"checkbox"
name=
"synchronizednsresolver"
value=
"on"
<?=
!
empty
(
$pconfig
[
'synchronizednsresolver'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_synchronizednsresolver"
>
<?=
gettext
(
'Automatically sync the DNS Resolver configuration to the other HA host when changes are made.'
)
?>
</div>
</td>
</tr>
<!-- Hook xmlrpc sync plugins -->
<!-- Hook xmlrpc sync plugins -->
<?php
<?php
foreach
(
$syncplugins
as
$syncid
=>
$synccnf
)
:?>
foreach
(
$syncplugins
as
$syncid
=>
$synccnf
)
:?>
...
...
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