From a99e13e55b6612167f117855ef64e262aa8a1d20 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 May 2018 10:09:06 +0200 Subject: [PATCH] sysutils/nut: little tweaks (#659) --- .../app/controllers/OPNsense/Nut/Api/ServiceController.php | 1 + .../nut/src/opnsense/mvc/app/views/OPNsense/Nut/index.volt | 4 ++-- .../nut/src/opnsense/service/conf/actions.d/actions_nut.conf | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sysutils/nut/src/opnsense/mvc/app/controllers/OPNsense/Nut/Api/ServiceController.php b/sysutils/nut/src/opnsense/mvc/app/controllers/OPNsense/Nut/Api/ServiceController.php index fbf732f15..ffe7f091e 100644 --- a/sysutils/nut/src/opnsense/mvc/app/controllers/OPNsense/Nut/Api/ServiceController.php +++ b/sysutils/nut/src/opnsense/mvc/app/controllers/OPNsense/Nut/Api/ServiceController.php @@ -41,6 +41,7 @@ class ServiceController extends ApiMutableServiceControllerBase public function upsstatusAction() { + $this->sessionClose(); $mdl = new Nut(); $host = '127.0.0.1'; if (!empty((string)$mdl->netclient->address)) { diff --git a/sysutils/nut/src/opnsense/mvc/app/views/OPNsense/Nut/index.volt b/sysutils/nut/src/opnsense/mvc/app/views/OPNsense/Nut/index.volt index b7caa9482..de22a92c3 100644 --- a/sysutils/nut/src/opnsense/mvc/app/views/OPNsense/Nut/index.volt +++ b/sysutils/nut/src/opnsense/mvc/app/views/OPNsense/Nut/index.volt @@ -46,8 +46,8 @@ updateServiceControlUI('nut'); - // call function update_diagnostics with a auto-refresh of 3 seconds - setInterval(update_diagnostics, 10000); + // call function update_diagnostics with a auto-refresh of 2 seconds + setInterval(update_diagnostics, 2000); // update history on tab state and implement navigation if(window.location.hash != "") { diff --git a/sysutils/nut/src/opnsense/service/conf/actions.d/actions_nut.conf b/sysutils/nut/src/opnsense/service/conf/actions.d/actions_nut.conf index daae2997c..d7ae051a5 100644 --- a/sysutils/nut/src/opnsense/service/conf/actions.d/actions_nut.conf +++ b/sysutils/nut/src/opnsense/service/conf/actions.d/actions_nut.conf @@ -17,7 +17,7 @@ type:script message:restarting nut [status] -command:/usr/local/etc/rc.d/nut status;exit 0 +command:/usr/local/etc/rc.d/nut_upsmon status;exit 0 parameters: type:script_output message:request nut status