diff options
author | Warren Baker <warren@decoy.co.za> | 2014-01-29 13:26:40 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2014-01-29 13:26:40 +0200 |
commit | 33232486d6451336d5e99dd964e3f6aa3b09b514 (patch) | |
tree | ac38ffffdfd0621bbba8bff6a66864ebf351877b /etc/inc/service-utils.inc | |
parent | 6d9a572da55a358e137d23c9e4030c45f1267a47 (diff) | |
download | pfsense-33232486d6451336d5e99dd964e3f6aa3b09b514.zip pfsense-33232486d6451336d5e99dd964e3f6aa3b09b514.tar.gz |
Add Unbound to the services list
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r-- | etc/inc/service-utils.inc | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index ed5df4b..324eae7 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -229,20 +229,27 @@ function get_services() { /* Add services that are in the base. * */ - if(is_radvd_enabled()) { + if (is_radvd_enabled()) { $pconfig = array(); $pconfig['name'] = "radvd"; $pconfig['description'] = gettext("Router Advertisement Daemon"); $services[] = $pconfig; } - if(isset($config['dnsmasq']['enable'])) { + if (isset($config['dnsmasq']['enable'])) { $pconfig = array(); $pconfig['name'] = "dnsmasq"; $pconfig['description'] = gettext("DNS Forwarder"); $services[] = $pconfig; } + if (isset($config['unbound']['enable'])) { + $pconfig = array(); + $pconfig['name'] = "unbound"; + $pconfig['description'] = gettext("Unbound DNS Forwarder"); + $services[] = $pconfig; + } + $pconfig = array(); $pconfig['name'] = "ntpd"; $pconfig['description'] = gettext("NTP clock sync"); @@ -268,21 +275,21 @@ function get_services() { $iflist[$if] = $if; } - if(isset($config['dhcrelay']['enable'])) { + if (isset($config['dhcrelay']['enable'])) { $pconfig = array(); $pconfig['name'] = "dhcrelay"; $pconfig['description'] = gettext("DHCP Relay"); $services[] = $pconfig; } - if(isset($config['dhcrelay6']['enable'])) { + if (isset($config['dhcrelay6']['enable'])) { $pconfig = array(); $pconfig['name'] = "dhcrelay6"; $pconfig['description'] = gettext("DHCPv6 Relay"); $services[] = $pconfig; } - if(is_dhcp_server_enabled()) { + if (is_dhcp_server_enabled()) { $pconfig = array(); $pconfig['name'] = "dhcpd"; $pconfig['description'] = gettext("DHCP Service"); @@ -297,7 +304,7 @@ function get_services() { $services[] = $pconfig; } - if(isset($config['snmpd']['enable'])) { + if (isset($config['snmpd']['enable'])) { $pconfig = array(); $pconfig['name'] = "bsnmpd"; $pconfig['description'] = gettext("SNMP Service"); @@ -597,6 +604,9 @@ function service_control_stop($name, $extras) { case 'dnsmasq': killbypid("{$g['varrun_path']}/dnsmasq.pid"); break; + case 'unbound': + killbypid("{$g['varrun_path']}/unbound.pid"); + break; case 'igmpproxy': killbyname("igmpproxy"); break; @@ -626,6 +636,7 @@ function service_control_stop($name, $extras) { } return sprintf(gettext("%s has been stopped."), htmlspecialchars($name)); } + function service_control_restart($name, $extras) { global $g; switch($name) { @@ -658,6 +669,9 @@ function service_control_restart($name, $extras) { case 'dnsmasq': services_dnsmasq_configure(); break; + case 'unbound': + services_unbound_configure(); + break; case 'dhcpd': services_dhcpd_configure(); break; |