From c0908940091f9b1003b2b49bf4d6a0b26e6769f7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 17 Aug 2024 18:12:56 +0200 Subject: [PATCH] ups: include Innova... --- openwrt/openwrt-configure-nut-ups.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) mode change 100644 => 100755 openwrt/openwrt-configure-nut-ups.sh diff --git a/openwrt/openwrt-configure-nut-ups.sh b/openwrt/openwrt-configure-nut-ups.sh old mode 100644 new mode 100755 index d87e478..1c793dc --- a/openwrt/openwrt-configure-nut-ups.sh +++ b/openwrt/openwrt-configure-nut-ups.sh @@ -3,7 +3,7 @@ # create configuration for nut based on available usb ups -if [ $# -lt 8 ] ; then +if [ $# -lt 1 ] ; then echo $0 "address" exit 1 fi @@ -12,11 +12,9 @@ address=$1; shift cat </dev/null | grep -e "iProduct.* UPS" -A1 | awk '/iSerial/ { print \$3 }'); do +for ups in \$(lsusb -vv 2>/dev/null | grep -e "iProduct.* UPS" -e "iProduct.*Innova Unity" -A1 | awk '/iSerial/ { print \$3 }'); do uci set nut_server.ups\${i}=driver uci set nut_server.ups\${i}.port=auto