mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-10 05:26:49 +03:00
Modules priority
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ local unistd = require("posix.unistd")
|
||||
|
||||
local Module = {
|
||||
name = "mod_email",
|
||||
runPrio = 60,
|
||||
config = {
|
||||
debug = false,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -4,6 +4,7 @@ local unistd = require("posix.unistd")
|
||||
|
||||
local Module = {
|
||||
name = "mod_public_ip",
|
||||
runPrio = 50,
|
||||
config = {
|
||||
debug = false,
|
||||
serviceConfig = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user