mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-12 14:37:01 +03:00
v1.5. Some new options. New package structure.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=internet-detector-mod-email
|
||||
PKG_VERSION:=1.4.6
|
||||
PKG_VERSION:=1.5.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||
|
||||
@@ -34,8 +34,8 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/internet-detector
|
||||
$(INSTALL_DATA) ./files/usr/lib/lua/internet-detector/mod_email.lua $(1)/usr/lib/lua/internet-detector/mod_email.lua
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/internet-detector/modules
|
||||
$(INSTALL_DATA) ./files/usr/lib/lua/internet-detector/modules/mod_email.lua $(1)/usr/lib/lua/internet-detector/modules/mod_email.lua
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -70,6 +70,12 @@ function Module:init(t)
|
||||
if t.mail_security ~= nil then
|
||||
self.mailSecurity = t.mail_security
|
||||
end
|
||||
if tonumber(t.message_at_startup) == 1 then
|
||||
self._msgSentDisconnect = false
|
||||
self._disconnected = false
|
||||
self._msgSentConnect = false
|
||||
self._connected = false
|
||||
end
|
||||
|
||||
if unistd.access(self.mta, "x") then
|
||||
self._enabled = true
|
||||
@@ -142,7 +148,7 @@ function Module:sendMessage(msg, textPattern)
|
||||
end
|
||||
end
|
||||
|
||||
function Module:run(currentStatus, lastStatus, timeDiff, timeNow, inetChecked)
|
||||
function Module:run(currentStatus, lastStatus, timeDiff, timeNow)
|
||||
if not self._enabled then
|
||||
return
|
||||
end
|
||||
Reference in New Issue
Block a user