mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
sysutils/dec-hw: style sweep
This commit is contained in:
parent
766804aa08
commit
1ee95029f0
4 changed files with 3 additions and 5 deletions
|
|
@ -5,4 +5,3 @@ PLUGIN_MAINTAINER= stephan.de.wit@deciso.com
|
|||
PLUGIN_TIER= 2
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
This package allows fetching the current power status for Deciso
|
||||
appliances with dual power supplies via an API call and includes a simple
|
||||
dashboard widget.
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class InfoController extends ApiControllerBase
|
|||
{
|
||||
$result = [
|
||||
"status" => "failed",
|
||||
"status_translated" => gettext("Power status could not be fetched.
|
||||
"status_translated" => gettext("Power status could not be fetched.
|
||||
This widget is only applicable to Deciso hardware with dual power supplies.")
|
||||
];
|
||||
$status = parse_ini_string((new Backend())->configdRun('dechw power'));
|
||||
|
|
@ -52,6 +52,6 @@ class InfoController extends ApiControllerBase
|
|||
$result = array_merge($result, $status);
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ i=1
|
|||
for PIN in 4 5; do
|
||||
STATUS=$(gpioctl -f "$GPIOC" "$PIN")
|
||||
printf "pwr%d=%d\n" "$i" "$STATUS"
|
||||
i=$((i + 1))
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in a new issue