mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-03 22:08:11 -04:00
sysutils/nut: further tweaks
This commit is contained in:
parent
d0c1e45334
commit
3cc82d5b4b
6 changed files with 15 additions and 8 deletions
|
|
@ -41,9 +41,10 @@ net-mgmt/collectd -- Collect system and application performance metrics periodic
|
|||
net-mgmt/snmp -- SNMP Server via bsnmpd
|
||||
net-mgmt/telegraf -- Agent for collecting metrics and data
|
||||
net-mgmt/zabbix-agent -- Enterprise-class open source distributed monitoring agent
|
||||
net-mgmt/zabbix-proxy -- Zabbix-Proxy enables decentralized monitoring
|
||||
net-mgmt/zabbix-proxy -- Zabbix Proxy enables decentralized monitoring
|
||||
net/arp-scan -- Get all peers connected to a local network
|
||||
net/freeradius -- RADIUS Authentication, Authorization and Accounting Server
|
||||
net/frr -- FRR Routing Suite
|
||||
net/ftp-proxy -- Control ftp-proxy processes
|
||||
net/haproxy -- Reliable, high performance TCP/HTTP load balancer
|
||||
net/igmp-proxy -- IGMP-Proxy Service
|
||||
|
|
@ -66,6 +67,7 @@ security/tinc -- Tinc VPN
|
|||
security/tor -- The Onion Router
|
||||
sysutils/boot-delay -- Apply a persistent 10 second boot delay
|
||||
sysutils/monit -- Proactive system monitoring
|
||||
sysutils/nut -- Network UPS Tools
|
||||
sysutils/smart -- SMART tools
|
||||
sysutils/vmware -- VMware tools
|
||||
sysutils/xen -- Xen guest utilities
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ Power Distribution Units, Automatic Transfer Switch, Power Supply Units
|
|||
and Solar Controllers.
|
||||
|
||||
NUT provides many control and monitoring features, with a uniform control
|
||||
and management interface.
|
||||
and management interface.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Michael Muenz
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OPNsense\Nut\Api;
|
||||
|
|
@ -43,6 +42,8 @@ class ServiceController extends ApiControllerBase
|
|||
public function restartAction()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
// close session for long running action
|
||||
$this->sessionClose();
|
||||
$backend = new Backend();
|
||||
$response = $backend->configdRun('nut restart');
|
||||
return array('response' => $response);
|
||||
|
|
@ -76,7 +77,6 @@ class ServiceController extends ApiControllerBase
|
|||
$status = 'unknown';
|
||||
}
|
||||
|
||||
|
||||
return array('status' => $status);
|
||||
}
|
||||
|
||||
|
|
@ -115,6 +115,8 @@ class ServiceController extends ApiControllerBase
|
|||
public function stopAction()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
// close session for long running action
|
||||
$this->sessionClose();
|
||||
$backend = new Backend();
|
||||
$response = $backend->configdRun('nut stop');
|
||||
return array('response' => $response);
|
||||
|
|
@ -129,6 +131,8 @@ class ServiceController extends ApiControllerBase
|
|||
public function startAction()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
// close session for long running action
|
||||
$this->sessionClose();
|
||||
$backend = new Backend();
|
||||
$response = $backend->configdRun('nut start');
|
||||
return array('response' => $response);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<subtab id="nut-general-settings" description="General Nut Settings">
|
||||
<field>
|
||||
<id>nut.general.enable</id>
|
||||
<label>Enable nut</label>
|
||||
<label>Enable Nut</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable or disable the nut service.</help>
|
||||
</field>
|
||||
|
|
|
|||
0
sysutils/nut/src/opnsense/scripts/OPNsense/Nut/setup.sh
Normal file → Executable file
0
sysutils/nut/src/opnsense/scripts/OPNsense/Nut/setup.sh
Normal file → Executable file
|
|
@ -1,6 +1,7 @@
|
|||
{% if helpers.exists('OPNsense.Nut.general.enable') and OPNsense.Nut.general.enable == '1' %}
|
||||
nut_enable="YES"
|
||||
nut_opnsense_bootup_run="/usr/local/opnsense/scripts/OPNsense/Nut/setup.sh"
|
||||
nut_var_script="/usr/local/opnsense/scripts/OPNsense/Nut/setup.sh"
|
||||
nut_enable="YES"
|
||||
{% else %}
|
||||
nut_enable="NO"
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue