sysutils/dec-hw: style sweep

This commit is contained in:
Franco Fichtner 2023-11-30 08:11:33 +01:00
parent 766804aa08
commit 1ee95029f0
4 changed files with 3 additions and 5 deletions

View file

@ -5,4 +5,3 @@ PLUGIN_MAINTAINER= stephan.de.wit@deciso.com
PLUGIN_TIER= 2
.include "../../Mk/plugins.mk"

View file

@ -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.

View file

@ -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;
}
}

View file

@ -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