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 proto = require "luci.http.protocol"
|
||||
local util = require "luci.util"
|
||||
|
||||
module "luci.lucid.http.handler.catchall"
|
||||
|
||||
|
|
|
@ -58,4 +58,17 @@ config daemon rpc
|
|||
option slave rpcd
|
||||
list address 12900
|
||||
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
|
||||
|
||||
state:set(UCINAME, "main", "pid", nixio.getpid())
|
||||
state:save(UCINAME)
|
||||
|
||||
run()
|
||||
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()
|
||||
local debug = tonumber((cursor:get(UCINAME, "main", "debug")))
|
||||
|
||||
|
|
Loading…
Reference in a new issue