main: allow loading arbitrary config
parent
8bc76da4b8
commit
6c14716222
12
main.lua
12
main.lua
|
@ -6,7 +6,17 @@ Node = require('core.node')
|
|||
ThreadNode = require('core.thread-node')
|
||||
NodeManager = require('core.node-manager')
|
||||
|
||||
local config = require('config')
|
||||
local config = nil
|
||||
if os.getenv("SIGNAGE_CONFIG") ~= nil then
|
||||
local f = loadfile(os.getenv("SIGNAGE_CONFIG"))
|
||||
if f ~= nil then
|
||||
config = f()
|
||||
else
|
||||
error("SIGNAGE_CONFIG given but could not be loaded")
|
||||
end
|
||||
else
|
||||
config = require('config')
|
||||
end
|
||||
|
||||
local push = require('vendor.push')
|
||||
|
||||
|
|
Loading…
Reference in New Issue