site_config.lua 303 B

123456789
  1. local config = os.getenv('GLUON_SITEDIR')
  2. local function loader()
  3. coroutine.yield('return ')
  4. coroutine.yield(io.open(config .. '/site.conf'):read('*a'))
  5. end
  6. -- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
  7. return setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()