mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
services: split code to get rid of shallow services.inc #3736
This commit is contained in:
parent
9c3cfc58c4
commit
b2560c6eb4
@ -29,208 +29,9 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* XXX remove this file, merging it into system.inc */
|
||||
|
||||
function service_by_name($name, $filter = array())
|
||||
{
|
||||
$services = plugins_services();
|
||||
|
||||
foreach ($services as $service) {
|
||||
if ($service['name'] != $name) {
|
||||
continue;
|
||||
}
|
||||
if (!count($filter)) {
|
||||
/* force match if filter wasn't set (standard behaviour) */
|
||||
$filter['name'] = $name;
|
||||
}
|
||||
foreach ($filter as $key => $value) {
|
||||
if (isset($service[$key]) && $service[$key] == $value) {
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
function service_status($service)
|
||||
{
|
||||
if (!empty($service['nocheck'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isset($service['pidfile'])) {
|
||||
return isvalidpid($service['pidfile']);
|
||||
}
|
||||
|
||||
return is_process_running($service['name']);
|
||||
}
|
||||
|
||||
function service_control_icon($service, $xs = false)
|
||||
{
|
||||
$output = '';
|
||||
|
||||
if (service_status($service)) {
|
||||
$output .= '<span class="label label-opnsense label-opnsense-%s label-success"><i class="fa fa-play fa-fw"></i></span>' . PHP_EOL;
|
||||
} else {
|
||||
$output .= '<span class="label label-opnsense label-opnsense-%s label-danger"><i class="fa fa-stop fa-fw"></i></span>' . PHP_EOL;
|
||||
}
|
||||
|
||||
return sprintf($output, $xs ? 'xs' : 'sm');
|
||||
}
|
||||
|
||||
function service_control_links($service, $xs = false)
|
||||
{
|
||||
$service_id = isset($service['id']) ? $service['id'] : '';
|
||||
|
||||
$template = '<span data-service_id="%s" data-service_action="%s" data-service="%s" ';
|
||||
$template .= 'class="btn btn-%s btn-default %s"><i class="%s"></i></span>' . PHP_EOL;
|
||||
|
||||
$output = '';
|
||||
|
||||
if (service_status($service)) {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'restart',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-refresh fa-fw'
|
||||
);
|
||||
if (empty($service['nocheck'])) {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'stop',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-stop fa-fw'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'start',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-play fa-fw'
|
||||
);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
function service_control_start($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not start unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['start'])) {
|
||||
foreach ($service['configd']['start'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['start'])) {
|
||||
foreach ($service['php']['start'] as $cmd) {
|
||||
$params = array();
|
||||
if (isset($service['php']['args'])) {
|
||||
foreach ($service['php']['args'] as $param) {
|
||||
$params[] = $service[$param];
|
||||
}
|
||||
}
|
||||
call_user_func_array($cmd, $params);
|
||||
}
|
||||
} elseif (isset($service['mwexec']['start'])) {
|
||||
foreach ($service['mwexec']['start'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} else {
|
||||
return sprintf(gettext("Could not start service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been started."), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
function service_control_stop($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not stop unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['stop'])) {
|
||||
foreach ($service['configd']['stop'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['stop'])) {
|
||||
foreach ($service['php']['stop'] as $cmd) {
|
||||
$cmd();
|
||||
}
|
||||
} elseif (isset($service['mwexec']['stop'])) {
|
||||
foreach ($service['mwexec']['stop'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} elseif (isset($service['pidfile'])) {
|
||||
killbypid($service['pidfile'], 'TERM', true);
|
||||
} else {
|
||||
/* last resort, but not very elegant */
|
||||
killbyname($service['name']);
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been stopped."), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
function service_control_restart($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not restart unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['restart'])) {
|
||||
foreach ($service['configd']['restart'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['restart'])) {
|
||||
foreach ($service['php']['restart'] as $cmd) {
|
||||
$params = array();
|
||||
if (isset($service['php']['args'])) {
|
||||
foreach ($service['php']['args'] as $param) {
|
||||
$params[] = $service[$param];
|
||||
}
|
||||
}
|
||||
call_user_func_array($cmd, $params);
|
||||
}
|
||||
} elseif (isset($service['mwexec']['restart'])) {
|
||||
foreach ($service['mwexec']['restart'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} else {
|
||||
return sprintf(gettext("Could not restart service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been restarted."), htmlspecialchars($name));
|
||||
}
|
||||
/*
|
||||
* XXX remove this file, kept for plugin compatibility
|
||||
*
|
||||
* The content moved to utils.inc and guiconfig.inc and should
|
||||
* thus be available to components without further modification.
|
||||
*/
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015-2019 Franco Fichtner <franco@opnsense.org>
|
||||
* Copyright (C) 2014-2019 Franco Fichtner <franco@opnsense.org>
|
||||
* Copyright (C) 2010 Ermal Luçi
|
||||
* Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
|
||||
* Copyright (C) 2004-2007 Scott Ullrich <sullrich@gmail.com>
|
||||
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
|
||||
* All rights reserved.
|
||||
@ -93,6 +95,152 @@ function is_process_running($process)
|
||||
return (intval($retval) == 0);
|
||||
}
|
||||
|
||||
function service_by_name($name, $filter = array())
|
||||
{
|
||||
$services = plugins_services();
|
||||
|
||||
foreach ($services as $service) {
|
||||
if ($service['name'] != $name) {
|
||||
continue;
|
||||
}
|
||||
if (!count($filter)) {
|
||||
/* force match if filter wasn't set (standard behaviour) */
|
||||
$filter['name'] = $name;
|
||||
}
|
||||
foreach ($filter as $key => $value) {
|
||||
if (isset($service[$key]) && $service[$key] == $value) {
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
function service_status($service)
|
||||
{
|
||||
if (!empty($service['nocheck'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isset($service['pidfile'])) {
|
||||
return isvalidpid($service['pidfile']);
|
||||
}
|
||||
|
||||
return is_process_running($service['name']);
|
||||
}
|
||||
|
||||
function service_control_start($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not start unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['start'])) {
|
||||
foreach ($service['configd']['start'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['start'])) {
|
||||
foreach ($service['php']['start'] as $cmd) {
|
||||
$params = array();
|
||||
if (isset($service['php']['args'])) {
|
||||
foreach ($service['php']['args'] as $param) {
|
||||
$params[] = $service[$param];
|
||||
}
|
||||
}
|
||||
call_user_func_array($cmd, $params);
|
||||
}
|
||||
} elseif (isset($service['mwexec']['start'])) {
|
||||
foreach ($service['mwexec']['start'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} else {
|
||||
return sprintf(gettext("Could not start service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been started."), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
function service_control_stop($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not stop unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['stop'])) {
|
||||
foreach ($service['configd']['stop'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['stop'])) {
|
||||
foreach ($service['php']['stop'] as $cmd) {
|
||||
$cmd();
|
||||
}
|
||||
} elseif (isset($service['mwexec']['stop'])) {
|
||||
foreach ($service['mwexec']['stop'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} elseif (isset($service['pidfile'])) {
|
||||
killbypid($service['pidfile'], 'TERM', true);
|
||||
} else {
|
||||
/* last resort, but not very elegant */
|
||||
killbyname($service['name']);
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been stopped."), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
function service_control_restart($name, $extras)
|
||||
{
|
||||
$filter = array();
|
||||
|
||||
if (!empty($extras['id'])) {
|
||||
$filter['id'] = $extras['id'];
|
||||
}
|
||||
|
||||
$service = service_by_name($name, $filter);
|
||||
if (!isset($service['name'])) {
|
||||
return sprintf(gettext("Could not restart unknown service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
if (isset($service['configd']['restart'])) {
|
||||
foreach ($service['configd']['restart'] as $cmd) {
|
||||
configd_run($cmd);
|
||||
}
|
||||
} elseif (isset($service['php']['restart'])) {
|
||||
foreach ($service['php']['restart'] as $cmd) {
|
||||
$params = array();
|
||||
if (isset($service['php']['args'])) {
|
||||
foreach ($service['php']['args'] as $param) {
|
||||
$params[] = $service[$param];
|
||||
}
|
||||
}
|
||||
call_user_func_array($cmd, $params);
|
||||
}
|
||||
} elseif (isset($service['mwexec']['restart'])) {
|
||||
foreach ($service['mwexec']['restart'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
} else {
|
||||
return sprintf(gettext("Could not restart service `%s'"), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
return sprintf(gettext("Service `%s' has been restarted."), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
function list_dh_parameters()
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once('util.inc');
|
||||
require_once("filter.inc");
|
||||
|
||||
@ -34,7 +34,6 @@ require_once 'util.inc';
|
||||
require_once 'system.inc';
|
||||
require_once 'interfaces.inc';
|
||||
require_once 'filter.inc';
|
||||
require_once 'services.inc';
|
||||
require_once 'auth.inc';
|
||||
|
||||
/*
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("rrd.inc");
|
||||
require_once("system.inc");
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
/**
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
$service_hook = 'strongswan';
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -1,38 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Copyright (C) 2014-2015 Deciso B.V.
|
||||
Copyright (C) 2012 Seth Mos <seth.mos@dds.nl>
|
||||
Copyright (C) 2004-2009 Scott Ullrich <sullrich@gmail.com>
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
* Copyright (C) 2014-2015 Deciso B.V.
|
||||
* Copyright (C) 2012 Seth Mos <seth.mos@dds.nl>
|
||||
* Copyright (C) 2004-2009 Scott Ullrich <sullrich@gmail.com>
|
||||
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
|
||||
/* expects $logfile to point to the system path */
|
||||
/* expects $logclog to be true or false */
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015-2016 Franco Fichtner <franco@opnsense.org>
|
||||
* Copyright (C) 2014-2019 Franco Fichtner <franco@opnsense.org>
|
||||
* Copyright (C) 2014 Deciso B.V.
|
||||
* Copyright (C) 2010 Ermal Luçi
|
||||
* Copyright (C) 2005-2006 Colin Smith <ethethlay@gmail.com>
|
||||
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
|
||||
* Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
|
||||
* All rights reserved.
|
||||
@ -82,7 +84,6 @@ function get_themed_filename($url)
|
||||
return $url; // not found, return source
|
||||
}
|
||||
|
||||
|
||||
require_once("authgui.inc");
|
||||
|
||||
/* Reserved table names to avoid colision */
|
||||
@ -95,7 +96,6 @@ $reserved_table_names = array(
|
||||
"webConfiguratorlockout"
|
||||
);
|
||||
|
||||
|
||||
$netbios_nodetypes = array(
|
||||
'0' => "none",
|
||||
'1' => "b-node",
|
||||
@ -562,3 +562,61 @@ function get_menu_messages()
|
||||
|
||||
return $menu_messages;
|
||||
}
|
||||
|
||||
function service_control_icon($service, $xs = false)
|
||||
{
|
||||
$output = '';
|
||||
|
||||
if (service_status($service)) {
|
||||
$output .= '<span class="label label-opnsense label-opnsense-%s label-success"><i class="fa fa-play fa-fw"></i></span>' . PHP_EOL;
|
||||
} else {
|
||||
$output .= '<span class="label label-opnsense label-opnsense-%s label-danger"><i class="fa fa-stop fa-fw"></i></span>' . PHP_EOL;
|
||||
}
|
||||
|
||||
return sprintf($output, $xs ? 'xs' : 'sm');
|
||||
}
|
||||
|
||||
function service_control_links($service, $xs = false)
|
||||
{
|
||||
$service_id = isset($service['id']) ? $service['id'] : '';
|
||||
|
||||
$template = '<span data-service_id="%s" data-service_action="%s" data-service="%s" ';
|
||||
$template .= 'class="btn btn-%s btn-default %s"><i class="%s"></i></span>' . PHP_EOL;
|
||||
|
||||
$output = '';
|
||||
|
||||
if (service_status($service)) {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'restart',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-refresh fa-fw'
|
||||
);
|
||||
if (empty($service['nocheck'])) {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'stop',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-stop fa-fw'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$output .= sprintf(
|
||||
$template,
|
||||
$service_id,
|
||||
'start',
|
||||
$service['name'],
|
||||
$xs ? 'xs' : 'sm',
|
||||
'srv_status_act',
|
||||
'fa fa-play fa-fw'
|
||||
);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@ -33,7 +33,6 @@ require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("rrd.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
|
||||
$rrdcfg = &config_read_array('rrd');
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
|
||||
@ -32,7 +32,6 @@ require_once("guiconfig.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
function reconfigure_dhcpd()
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
// handle identifiers and action
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig['enable'] = isset($config['dhcrelay6']['enable']);
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("plugins.inc.d/dnsmasq.inc");
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/dnsmasq.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
$a_hosts = &config_read_array('dnsmasq', 'hosts');
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("rrd.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ntpd.inc");
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ntpd.inc");
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ntpd.inc");
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/unbound.inc");
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/unbound.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/unbound.inc");
|
||||
|
||||
config_read_array('unbound');
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
$a_domainOverrides = &config_read_array('unbound', 'domainoverrides');
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
$a_hosts = &config_read_array('unbound', 'hosts');
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/unbound.inc");
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("config.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/dhcpd.inc");
|
||||
|
||||
function adjust_utc($dt)
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
if (!isset($config['ntpd']['noquery'])) {
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/openvpn.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("system.inc");
|
||||
require_once("services.inc");
|
||||
|
||||
$a_gateway_groups = &config_read_array('gateways', 'gateway_group');
|
||||
$gateways_status = return_gateways_status();
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
$a_gateway_groups = &config_read_array('gateways', 'gateway_group');
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
|
||||
/**
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/dpinger.inc");
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
config_read_array('ipsec', 'mobilekey');
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
config_read_array('ipsec', 'client');
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
require_once("guiconfig.inc");
|
||||
require_once("system.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("services.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
/**
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("filter.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/ipsec.inc");
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/openvpn.inc");
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/openvpn.inc");
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("interfaces.inc");
|
||||
require_once("plugins.inc.d/openvpn.inc");
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
*/
|
||||
|
||||
require_once("guiconfig.inc");
|
||||
require_once("services.inc");
|
||||
require_once("system.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user