mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
plugins: style, whitespace and sync
This commit is contained in:
parent
b2a556f057
commit
afab6eaf7d
11 changed files with 20 additions and 18 deletions
4
LICENSE
4
LICENSE
|
|
@ -5,7 +5,8 @@ Copyright (c) 2005-2006 Colin Smith <ethethlay@gmail.com>
|
|||
Copyright (c) 2020 D. Domig
|
||||
Copyright (c) 2011 Dan Myers
|
||||
Copyright (c) 2017-2018 David Harrigan
|
||||
Copyright (c) 2014-2020 Deciso B.V.
|
||||
Copyright (c) 2021 David Hughes
|
||||
Copyright (c) 2014-2021 Deciso B.V.
|
||||
Copyright (c) 2008 Donovan Schonknecht
|
||||
Copyright (c) 2016-2019 EURO-LOG AG
|
||||
Copyright (c) 2006 Eric Friesen
|
||||
|
|
@ -15,6 +16,7 @@ Copyright (c) 2019 Felix Matouschek <felix@matouschek.org>
|
|||
Copyright (c) 2014-2021 Franco Fichtner <franco@opnsense.org>
|
||||
Copyright (c) 2016-2021 Frank Wall
|
||||
Copyright (c) 2016 IT-assistans Sverige AB
|
||||
Copyright (c) 2021 Jan Winkler
|
||||
Copyright (c) 2010 Jim Pingle <jimp@pfsense.org>
|
||||
Copyright (c) 2015 Jos Schellevis
|
||||
Copyright (c) 2018 João Vilaça <machadovilaca@gmail.com>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ dns/bind -- BIND domain name service
|
|||
dns/dnscrypt-proxy -- Flexible DNS proxy supporting DNSCrypt and DoH
|
||||
dns/dyndns -- Dynamic DNS Support
|
||||
dns/rfc2136 -- RFC-2136 Support
|
||||
emulators/qemu-guest-agent -- QEMU Guest Agent for OPNsense (development only)
|
||||
emulators/qemu-guest-agent -- QEMU Guest Agent for OPNsense
|
||||
mail/fetchmail -- Remote-mail retrieval utility (development only)
|
||||
mail/postfix -- SMTP mail relay
|
||||
mail/rspamd -- Protect your network from spam
|
||||
|
|
@ -100,6 +100,7 @@ sysutils/mail-backup -- Send configuration file backup by e-mail
|
|||
sysutils/munin-node -- Munin monitoring agent
|
||||
sysutils/node_exporter -- Prometheus exporter for machine metrics
|
||||
sysutils/nut -- Network UPS Tools
|
||||
sysutils/puppet-agent -- Manage Puppet Agent (development only)
|
||||
sysutils/smart -- SMART tools
|
||||
sysutils/virtualbox -- VirtualBox guest additions
|
||||
sysutils/vmware -- VMware tools
|
||||
|
|
|
|||
0
net-mgmt/zabbix4-proxy/src/opnsense/scripts/systemhealth/logformats/zabbix_proxy.py
Normal file → Executable file
0
net-mgmt/zabbix4-proxy/src/opnsense/scripts/systemhealth/logformats/zabbix_proxy.py
Normal file → Executable file
0
net-mgmt/zabbix5-proxy/src/opnsense/scripts/systemhealth/logformats/zabbix_proxy.py
Normal file → Executable file
0
net-mgmt/zabbix5-proxy/src/opnsense/scripts/systemhealth/logformats/zabbix_proxy.py
Normal file → Executable file
|
|
@ -49,7 +49,6 @@ function radsecproxy_syslog()
|
|||
'facility' => array('LOG_DAEMON'),
|
||||
);
|
||||
return $logfacilities;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class StatusController extends ApiControllerBase
|
|||
/**
|
||||
* get relayd summary
|
||||
*/
|
||||
public function sumAction($wait=0)
|
||||
public function sumAction($wait = 0)
|
||||
{
|
||||
$result = array("result" => "failed");
|
||||
$backend = new Backend();
|
||||
|
|
@ -93,7 +93,7 @@ class StatusController extends ApiControllerBase
|
|||
if (!empty($virtualserver['tables'])) {
|
||||
foreach ($virtualserver['tables'] as &$table) {
|
||||
if (!empty($table['uuid'])) {
|
||||
$tblnode = $relaydMdl->getNodeByReference("table.".$table['uuid']);
|
||||
$tblnode = $relaydMdl->getNodeByReference("table." . $table['uuid']);
|
||||
foreach (explode(",", (string)$tblnode->hosts) as $host_uuid) {
|
||||
$found = false;
|
||||
if (!empty($table['hosts'])) {
|
||||
|
|
@ -108,7 +108,7 @@ class StatusController extends ApiControllerBase
|
|||
$table['hosts'] = [];
|
||||
}
|
||||
if (!$found) {
|
||||
$hostnode = $relaydMdl->getNodeByReference("host.".$host_uuid);
|
||||
$hostnode = $relaydMdl->getNodeByReference("host." . $host_uuid);
|
||||
$table['hosts'][$host_uuid] = [
|
||||
"name" => (string)$hostnode->address,
|
||||
"description" => (string)$hostnode->name,
|
||||
|
|
@ -174,7 +174,7 @@ class StatusController extends ApiControllerBase
|
|||
if (count($objs) > 0) {
|
||||
$linked_hosts = [];
|
||||
if (!empty($virtualserver['tables'][$tableId]['uuid'])) {
|
||||
$tblnode = $relaydMdl->getNodeByReference("table.".$virtualserver['tables'][$tableId]['uuid']);
|
||||
$tblnode = $relaydMdl->getNodeByReference("table." . $virtualserver['tables'][$tableId]['uuid']);
|
||||
$linked_hosts = explode(",", (string)$tblnode->hosts);
|
||||
}
|
||||
// hosts aren't necessarily unique due to address matching
|
||||
|
|
@ -204,9 +204,9 @@ class StatusController extends ApiControllerBase
|
|||
if ($this->request->isPost()) {
|
||||
$this->sessionClose();
|
||||
$backend = new Backend();
|
||||
if (in_array($nodeType, ['redirect', 'table', 'host']) && in_array($action, ['enable', 'disable'])){
|
||||
if (in_array($nodeType, ['redirect', 'table', 'host']) && in_array($action, ['enable', 'disable'])) {
|
||||
if ($id != null && $id > 0) {
|
||||
$result["output"] = $backend->configdpRun("relayd toggle",[$nodeType, $action, $id]);
|
||||
$result["output"] = $backend->configdpRun("relayd toggle", [$nodeType, $action, $id]);
|
||||
if (isset($result["output"])) {
|
||||
$result["result"] = 'ok';
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ class StatusController extends ApiControllerBase
|
|||
$new_status = $action == "remove" ? "0" : "1";
|
||||
$relaydMdl = new Relayd();
|
||||
foreach (explode(",", $id) as $host_uuid) {
|
||||
$obj = $relaydMdl->getNodeByReference("host.".$host_uuid);
|
||||
$obj = $relaydMdl->getNodeByReference("host." . $host_uuid);
|
||||
if ($obj != null) {
|
||||
$obj->enabled = $new_status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2021 Jan Winkler
|
||||
* Copyright (C) 2021 Jan Winkler
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ class ServiceController extends ApiMutableServiceControllerBase
|
|||
$this->stopAction();
|
||||
}
|
||||
return array("status" => "ok");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return array("status" => "failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,3 @@ server = {{ OPNsense.puppetagent.general.FQDN|default("") }}
|
|||
environment = {{ OPNsense.puppetagent.general.Environment|default("") }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ use Phalcon\Messages\Message;
|
|||
*/
|
||||
class NaxsiIdentifierConstraint extends BaseConstraint
|
||||
{
|
||||
public function validate(\Phalcon\Validation $validator, $attribute) : bool
|
||||
public function validate(\Phalcon\Validation $validator, $attribute): bool
|
||||
{
|
||||
$node = $this->getOption('node');
|
||||
if ($node) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ use Phalcon\Messages\Message;
|
|||
*/
|
||||
class NgxBusyBufferConstraint extends BaseConstraint
|
||||
{
|
||||
public function validate(\Phalcon\Validation $validator, $attribute) : bool
|
||||
public function validate(\Phalcon\Validation $validator, $attribute): bool
|
||||
{
|
||||
$node = $this->getOption('node');
|
||||
if ($node) {
|
||||
|
|
@ -64,7 +64,8 @@ class NgxBusyBufferConstraint extends BaseConstraint
|
|||
$proxy_buffer_size_int = intval((string) $proxy_buffer_size_node);
|
||||
}
|
||||
|
||||
if (isset($proxy_buffers_total_minus1_size) && isset($proxy_busy_buffers_size) &&
|
||||
if (
|
||||
isset($proxy_buffers_total_minus1_size) && isset($proxy_busy_buffers_size) &&
|
||||
$proxy_buffers_total_minus1_size < $proxy_busy_buffers_size
|
||||
) {
|
||||
$validator->appendMessage(new Message(
|
||||
|
|
@ -74,7 +75,8 @@ class NgxBusyBufferConstraint extends BaseConstraint
|
|||
}
|
||||
|
||||
// nginx: [emerg] "proxy_busy_buffers_size" must be equal to or greater than the maximum of the value of "proxy_buffer_size" and one of the "proxy_buffers"
|
||||
if (isset($proxy_busy_buffers_size) && isset($proxy_buffers_size_int) &&
|
||||
if (
|
||||
isset($proxy_busy_buffers_size) && isset($proxy_buffers_size_int) &&
|
||||
$proxy_busy_buffers_size < $proxy_buffers_size_int
|
||||
) {
|
||||
$validator->appendMessage(new Message(
|
||||
|
|
|
|||
Loading…
Reference in a new issue