Modules priority

This commit is contained in:
gSpot
2023-08-14 19:59:21 +03:00
parent f92713818d
commit 170bd8ddd7
10 changed files with 12 additions and 4 deletions

View File

@@ -19,9 +19,9 @@ Internet-detector is an application for checking the availability of the Interne
**OpenWrt >= 21.02:**
opkg update
wget --no-check-certificate -O /tmp/internet-detector_1.0-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.0-1_all.ipk
opkg install /tmp/internet-detector_1.0-1_all.ipk
rm /tmp/internet-detector_1.0-1_all.ipk
wget --no-check-certificate -O /tmp/internet-detector_1.0-2_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.0-2_all.ipk
opkg install /tmp/internet-detector_1.0-2_all.ipk
rm /tmp/internet-detector_1.0-2_all.ipk
/etc/init.d/internet-detector start
/etc/init.d/internet-detector enable

View File

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

View File

@@ -181,6 +181,7 @@ function InternetDetector:loadModules()
end
end
end
table.sort(self.modules, function(a, b) return a.runPrio < b.runPrio end)
end
end

View File

@@ -6,6 +6,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_email",
runPrio = 60,
config = {
debug = false,
},

View File

@@ -4,6 +4,7 @@ local dirent = require("posix.dirent")
local Module = {
name = "mod_led_control",
runPrio = 10,
config = {},
syslog = function(level, msg) return true end,
writeValue = function(filePath, str) return false end,

View File

@@ -6,6 +6,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_modem_restart",
runPrio = 40,
config = {},
syslog = function(level, msg) return true end,
writeValue = function(filePath, str) return false end,

View File

@@ -3,6 +3,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_network_restart",
runPrio = 30,
config = {},
syslog = function(level, msg) return true end,
writeValue = function(filePath, str) return false end,

View File

@@ -4,6 +4,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_public_ip",
runPrio = 50,
config = {
debug = false,
serviceConfig = {

View File

@@ -3,6 +3,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_reboot",
runPrio = 20,
config = {},
syslog = function(level, msg) return true end,
writeValue = function(filePath, str) return false end,

View File

@@ -3,6 +3,7 @@ local unistd = require("posix.unistd")
local Module = {
name = "mod_user_scripts",
runPrio = 70,
config = {},
syslog = function(level, msg) return true end,
writeValue = function(filePath, str) return false end,