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

@@ -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,