Commit 9fb7a305 authored by Franco Fichtner's avatar Franco Fichtner

system: more migration of xmlrcp sync settings #1319

parent 2e44a885
...@@ -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
......
...@@ -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 */
......
...@@ -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;
}
...@@ -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;
}
...@@ -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();
......
...@@ -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 */
......
...@@ -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')) {
......
...@@ -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):?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment