Make wizard behave friendly when luci-admin is installed
This commit is contained in:
parent
a75833cd29
commit
065b392b34
|
@ -1,12 +1,14 @@
|
|||
module("luci.controller.ffhl.index", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({}, call("maybe_wizard"), "luebeck.freifunk.net", 20).dependent=false
|
||||
local uci = luci.model.uci.cursor()
|
||||
|
||||
if uci:get_first("ffhl", "wizard", "enabled") == "1" then
|
||||
local root = node()
|
||||
if not root.target then
|
||||
root.target = alias("wizard", "welcome")
|
||||
root.index = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function maybe_wizard()
|
||||
-- This function should figure out whether the wizard already ran succesfully
|
||||
-- and redirect to the wizard or the status page.
|
||||
|
||||
luci.http.redirect(luci.dispatcher.build_url("wizard", "welcome"))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue