2017-01-18 16:21:43 +00:00
|
|
|
local config = os.getenv('GLUON_SITEDIR')
|
2015-12-30 02:35:17 +00:00
|
|
|
|
|
|
|
local function loader()
|
|
|
|
coroutine.yield('return ')
|
2017-01-18 16:21:43 +00:00
|
|
|
coroutine.yield(io.open(config .. '/site.conf'):read('*a'))
|
2015-12-30 02:35:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
-- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
|
|
|
|
return setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()
|