Skip to content
Snippets Groups Projects
Unverified Commit 24a085a5 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-site: add default domain and check for it


This does not do anything yet, as this_domain() is not implemented yet.

Based-on-patch-by: default avatarlemoer <git@irrelefant.net>
parent 07dbfea6
No related branches found
No related tags found
No related merge requests found
need_string(in_site({'site_code'}))
need_string(in_site({'site_name'}))
-- this_domain() returns nil when multidomain support is disabled
if this_domain() then
function need_domain_name(path)
need_string(path)
need(path, function(default_domain)
local f = io.open(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/domains/' .. default_domain .. '.json')
if not f then return false end
f:close()
return true
end, nil, 'be a valid domain name')
end
need_domain_name(in_site({'default_domain'}))
end
need_string_match(in_domain({'domain_seed'}), '^' .. ('%x'):rep(64) .. '$')
need_string({'opkg', 'lede'}, false)
......
......@@ -18,6 +18,10 @@ function in_domain(var)
return var
end
function this_domain()
return nil
end
local function path_to_string(path)
return table.concat(path, '/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment