diff --git a/openwrt/openwrt-configure-nut-ups.sh b/openwrt/openwrt-configure-nut-ups.sh index 1c793dc..af9f6b1 100755 --- a/openwrt/openwrt-configure-nut-ups.sh +++ b/openwrt/openwrt-configure-nut-ups.sh @@ -14,7 +14,7 @@ cat </dev/null | grep -e "iProduct.* UPS" -e "iProduct.*Innova Unity" -A1 | awk '/iSerial/ { print \$3 }'); do +for ups in \$(lsusb -vv 2>/dev/null | grep -e "iProduct.* UPS" -e "iProduct.*Innova Unity" -e "iProduct.*LIHVX2K0" -A1 | awk '/iSerial/ { print \$3 }'); do uci set nut_server.ups\${i}=driver uci set nut_server.ups\${i}.port=auto