mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-06 11:36:49 +03:00
Minor fixes.
This commit is contained in:
36
README.md
36
README.md
@@ -20,22 +20,22 @@ Internet-detector is an application for checking the availability of the Interne
|
|||||||
## Installation notes:
|
## Installation notes:
|
||||||
|
|
||||||
opkg update
|
opkg update
|
||||||
wget --no-check-certificate -O /tmp/internet-detector_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/internet-detector_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/internet-detector_1.6.5-r1_all.ipk
|
opkg install /tmp/internet-detector_1.6.6-r1_all.ipk
|
||||||
rm /tmp/internet-detector_1.6.5-r1_all.ipk
|
rm /tmp/internet-detector_1.6.6-r1_all.ipk
|
||||||
service internet-detector start
|
service internet-detector start
|
||||||
service internet-detector enable
|
service internet-detector enable
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/luci-app-internet-detector_1.6.5-r1_all.ipk
|
opkg install /tmp/luci-app-internet-detector_1.6.6-r1_all.ipk
|
||||||
rm /tmp/luci-app-internet-detector_1.6.5-r1_all.ipk
|
rm /tmp/luci-app-internet-detector_1.6.6-r1_all.ipk
|
||||||
service rpcd restart
|
service rpcd restart
|
||||||
|
|
||||||
i18n-ru:
|
i18n-ru:
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/luci-i18n-internet-detector-ru_1.6.5-r1_all.ipk
|
opkg install /tmp/luci-i18n-internet-detector-ru_1.6.6-r1_all.ipk
|
||||||
rm /tmp/luci-i18n-internet-detector-ru_1.6.5-r1_all.ipk
|
rm /tmp/luci-i18n-internet-detector-ru_1.6.6-r1_all.ipk
|
||||||
|
|
||||||
## Screenshots:
|
## Screenshots:
|
||||||
|
|
||||||
@@ -47,9 +47,9 @@ i18n-ru:
|
|||||||
|
|
||||||
**Dependences:** modemmanager.
|
**Dependences:** modemmanager.
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/internet-detector-mod-modem-restart_1.6.5-r1_all.ipk
|
opkg install /tmp/internet-detector-mod-modem-restart_1.6.6-r1_all.ipk
|
||||||
rm /tmp/internet-detector-mod-modem-restart_1.6.5-r1_all.ipk
|
rm /tmp/internet-detector-mod-modem-restart_1.6.6-r1_all.ipk
|
||||||
service internet-detector restart
|
service internet-detector restart
|
||||||
|
|
||||||

|

|
||||||
@@ -58,9 +58,9 @@ i18n-ru:
|
|||||||
|
|
||||||
**Dependences:** mailsend.
|
**Dependences:** mailsend.
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/internet-detector-mod-email_1.6.5-r1_all.ipk
|
opkg install /tmp/internet-detector-mod-email_1.6.6-r1_all.ipk
|
||||||
rm /tmp/internet-detector-mod-email_1.6.5-r1_all.ipk
|
rm /tmp/internet-detector-mod-email_1.6.6-r1_all.ipk
|
||||||
service internet-detector restart
|
service internet-detector restart
|
||||||
|
|
||||||

|

|
||||||
@@ -69,9 +69,9 @@ i18n-ru:
|
|||||||
|
|
||||||
**Dependences:** curl.
|
**Dependences:** curl.
|
||||||
|
|
||||||
wget --no-check-certificate -O /tmp/internet-detector-mod-telegram_1.6.5-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-telegram_1.6.5-r1_all.ipk
|
wget --no-check-certificate -O /tmp/internet-detector-mod-telegram_1.6.6-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-telegram_1.6.6-r1_all.ipk
|
||||||
opkg install /tmp/internet-detector-mod-telegram_1.6.5-r1_all.ipk
|
opkg install /tmp/internet-detector-mod-telegram_1.6.6-r1_all.ipk
|
||||||
rm /tmp/internet-detector-mod-telegram_1.6.5-r1_all.ipk
|
rm /tmp/internet-detector-mod-telegram_1.6.6-r1_all.ipk
|
||||||
service internet-detector restart
|
service internet-detector restart
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=internet-detector-mod-email
|
PKG_NAME:=internet-detector-mod-email
|
||||||
PKG_VERSION:=1.6.5
|
PKG_VERSION:=1.6.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=internet-detector-mod-modem-restart
|
PKG_NAME:=internet-detector-mod-modem-restart
|
||||||
PKG_VERSION:=1.6.5
|
PKG_VERSION:=1.6.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=internet-detector-mod-telegram
|
PKG_NAME:=internet-detector-mod-telegram
|
||||||
PKG_VERSION:=1.6.5
|
PKG_VERSION:=1.6.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=internet-detector
|
PKG_NAME:=internet-detector
|
||||||
PKG_VERSION:=1.6.5
|
PKG_VERSION:=1.6.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
PKG_MAINTAINER:=gSpot <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ run_instance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
config_load internet-detector
|
config_load "internet-detector"
|
||||||
config_get mode "config" mode "0"
|
config_get mode "config" mode "0"
|
||||||
if [ $mode = "1" ]; then
|
if [ $mode = "1" ]; then
|
||||||
config_foreach run_instance "instance"
|
config_foreach run_instance "instance"
|
||||||
|
|||||||
@@ -88,28 +88,21 @@ function InternetDetector:prequire(package)
|
|||||||
return ok and pkg
|
return ok and pkg
|
||||||
end
|
end
|
||||||
|
|
||||||
function InternetDetector:loadUCIConfig(sType, instance)
|
function InternetDetector:loadInstanceConfig(instance)
|
||||||
local success
|
local sections = uciCursor:get_all(self.appName)
|
||||||
local num = 0
|
local t = sections[instance]
|
||||||
uciCursor:foreach(
|
if t then
|
||||||
self.appName,
|
for k, v in pairs(t) do
|
||||||
sType,
|
|
||||||
function(s)
|
|
||||||
if s[".name"] == instance then
|
|
||||||
for k, v in pairs(s) do
|
|
||||||
if type(v) == "string" and v:match("^[%d]+$") then
|
if type(v) == "string" and v:match("^[%d]+$") then
|
||||||
v = tonumber(v)
|
v = tonumber(v)
|
||||||
end
|
end
|
||||||
self.serviceConfig[k] = v
|
self.serviceConfig[k] = v
|
||||||
end
|
end
|
||||||
success = true
|
|
||||||
self.serviceConfig.instanceNum = num
|
|
||||||
end
|
|
||||||
num = num + 1
|
|
||||||
end
|
|
||||||
)
|
|
||||||
self.serviceConfig.instance = instance
|
self.serviceConfig.instance = instance
|
||||||
return success
|
self.serviceConfig.instanceNum = t[".index"]
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function InternetDetector:writeValueToFile(filePath, str)
|
function InternetDetector:writeValueToFile(filePath, str)
|
||||||
@@ -693,7 +686,7 @@ function InternetDetector:daemon()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function InternetDetector:setServiceConfig(instance)
|
function InternetDetector:setServiceConfig(instance)
|
||||||
if self:loadUCIConfig("instance", instance) then
|
if self:loadInstanceConfig(instance) then
|
||||||
self:parseHosts()
|
self:parseHosts()
|
||||||
if self.mode == 2 then
|
if self.mode == 2 then
|
||||||
self.loggingLevel = 0
|
self.loggingLevel = 0
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
local stdlib = require("posix.stdlib")
|
local stdlib = require("posix.stdlib")
|
||||||
local unistd = require("posix.unistd")
|
|
||||||
local time = require("posix.time")
|
local time = require("posix.time")
|
||||||
|
local unistd = require("posix.unistd")
|
||||||
|
|
||||||
local Module = {
|
local Module = {
|
||||||
name = "mod_regular_script",
|
name = "mod_regular_script",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-internet-detector
|
PKG_NAME:=luci-app-internet-detector
|
||||||
PKG_VERSION:=1.6.5
|
PKG_VERSION:=1.6.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
LUCI_TITLE:=LuCI support for internet-detector
|
LUCI_TITLE:=LuCI support for internet-detector
|
||||||
LUCI_DEPENDS:=+internet-detector
|
LUCI_DEPENDS:=+internet-detector
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ return view.extend({
|
|||||||
'hosts', _('Hosts'),
|
'hosts', _('Hosts'),
|
||||||
_('Hosts to check Internet availability. Hosts are polled (in list order) until at least one of them responds.')
|
_('Hosts to check Internet availability. Hosts are polled (in list order) until at least one of them responds.')
|
||||||
);
|
);
|
||||||
o.datatype = 'or(or(host,hostport),ipaddrport(1))';
|
o.datatype = 'or(host,hostport,ipaddrport(1))';
|
||||||
o.default = this.defaultHosts;
|
o.default = this.defaultHosts;
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
@@ -895,6 +895,14 @@ return view.extend({
|
|||||||
|
|
||||||
s.addModalOptions = (s, section_id, ev) => {
|
s.addModalOptions = (s, section_id, ev) => {
|
||||||
|
|
||||||
|
if(section_id == 'config') {
|
||||||
|
s.map.children = [];
|
||||||
|
s.map.readonly = true;
|
||||||
|
s.map.children.push(new form.NamedSection(s.map, '_dummy', '_dummy',
|
||||||
|
_('Error!'), _('Invalid instance name...')));
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
if(this.currentAppMode !== '2') {
|
if(this.currentAppMode !== '2') {
|
||||||
|
|
||||||
// LED control
|
// LED control
|
||||||
|
|||||||
@@ -175,6 +175,9 @@ msgstr "Включен"
|
|||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Ошибка"
|
msgstr "Ошибка"
|
||||||
|
|
||||||
|
msgid "Error!"
|
||||||
|
msgstr "Ошибка!"
|
||||||
|
|
||||||
msgid "Expecting:"
|
msgid "Expecting:"
|
||||||
msgstr "Ожидается:"
|
msgstr "Ожидается:"
|
||||||
|
|
||||||
@@ -272,6 +275,9 @@ msgstr "Интервал между запусками down-script."
|
|||||||
msgid "Interval between up-script runs."
|
msgid "Interval between up-script runs."
|
||||||
msgstr "Интервал между запусками up-script."
|
msgstr "Интервал между запусками up-script."
|
||||||
|
|
||||||
|
msgid "Invalid instance name..."
|
||||||
|
msgstr "Недопустимое имя экземпляра..."
|
||||||
|
|
||||||
msgid "Jumbo: 9000 bytes"
|
msgid "Jumbo: 9000 bytes"
|
||||||
msgstr "Гигантский: 9000 байт"
|
msgstr "Гигантский: 9000 байт"
|
||||||
|
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ msgstr ""
|
|||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Error!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Expecting:"
|
msgid "Expecting:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -257,6 +260,9 @@ msgstr ""
|
|||||||
msgid "Interval between up-script runs."
|
msgid "Interval between up-script runs."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Invalid instance name..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Jumbo: 9000 bytes"
|
msgid "Jumbo: 9000 bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user