sites.lua 311 B

123456789
  1. local config = os.getenv('GLUON_SITEDIR') .. '/extra/sites.conf'
  2. local function loader()
  3. coroutine.yield('return ')
  4. coroutine.yield(io.open(config):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), 'sites.conf')), {})()