Fix redirector
This commit is contained in:
parent
f7deae100d
commit
73eae62580
3 changed files with 26 additions and 1 deletions
|
@ -13,6 +13,7 @@ $Id$
|
||||||
|
|
||||||
local srv = require "luci.lucid.http.server"
|
local srv = require "luci.lucid.http.server"
|
||||||
local proto = require "luci.http.protocol"
|
local proto = require "luci.http.protocol"
|
||||||
|
local util = require "luci.util"
|
||||||
|
|
||||||
module "luci.lucid.http.handler.catchall"
|
module "luci.lucid.http.handler.catchall"
|
||||||
|
|
||||||
|
|
|
@ -59,3 +59,16 @@ config daemon rpc
|
||||||
list address 12900
|
list address 12900
|
||||||
list publisher mainrpc
|
list publisher mainrpc
|
||||||
option enabled 1
|
option enabled 1
|
||||||
|
|
||||||
|
config 'daemon' 'splashr'
|
||||||
|
option 'slave' 'httpd'
|
||||||
|
list 'address' '8082'
|
||||||
|
list 'publisher' 'splashredir'
|
||||||
|
option 'enabled' '1'
|
||||||
|
|
||||||
|
config 'Redirector' 'splashredir'
|
||||||
|
option 'name' 'Splashd'
|
||||||
|
option 'virtual' '/'
|
||||||
|
option 'physical' ':80/luci/splash'
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,20 @@ function start()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
state:set(UCINAME, "main", "pid", nixio.getpid())
|
||||||
|
state:save(UCINAME)
|
||||||
|
|
||||||
run()
|
run()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function stop()
|
||||||
|
local pid = tonumber(state:get(UCINAME, "main", "pid"))
|
||||||
|
if pid then
|
||||||
|
return nixio.kill(pid, nixio.const.SIGTERM)
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function prepare()
|
function prepare()
|
||||||
local debug = tonumber((cursor:get(UCINAME, "main", "debug")))
|
local debug = tonumber((cursor:get(UCINAME, "main", "debug")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue