mod_led_control: fixed regexp.

This commit is contained in:
gSpot
2025-05-30 22:35:30 +03:00
parent 63ddfa1ed0
commit d0c1f03ce5
3 changed files with 5 additions and 5 deletions

View File

@@ -17,9 +17,9 @@ Internet-detector is an application for checking the availability of the Interne
## Installation notes:
opkg update
wget --no-check-certificate -O /tmp/internet-detector_1.4.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.4.6-r1_all.ipk
opkg install /tmp/internet-detector_1.4.6-r1_all.ipk
rm /tmp/internet-detector_1.4.6-r1_all.ipk
wget --no-check-certificate -O /tmp/internet-detector_1.4.6-r2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.4.6-r2_all.ipk
opkg install /tmp/internet-detector_1.4.6-r2_all.ipk
rm /tmp/internet-detector_1.4.6-r2_all.ipk
service internet-detector start
service internet-detector enable

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=internet-detector
PKG_VERSION:=1.4.6
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
include $(INCLUDE_DIR)/package.mk

View File

@@ -44,7 +44,7 @@ function Module:setLedAttrs(t)
trigger = self.readValue(t.ledTriggerFile),
}
if t.ledPrevState.trigger then
t.ledPrevState.trigger = t.ledPrevState.trigger:match("%[%w+%]"):gsub("[%]%[]", "")
t.ledPrevState.trigger = t.ledPrevState.trigger:match("%[[%w%-_]+%]"):gsub("[%]%[]", "")
end
end