Fix redirector

This commit is contained in:
Steven Barth 2009-05-26 17:44:27 +00:00
parent f7deae100d
commit 73eae62580
3 changed files with 26 additions and 1 deletions

View file

@ -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"

View file

@ -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'

View file

@ -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")))