summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-05-26 17:44:27 +0000
committerSteven Barth <steven@midlink.org>2009-05-26 17:44:27 +0000
commit73eae62580d4f78ade009415ba6533f502f29e5e (patch)
treedcde6a5b74330a44176fdb7d7436488ebf3caba3
parentf7deae100d6d36c1e8d6fef17316ca03aaf7214c (diff)
Fix redirector
-rw-r--r--libs/lucid-http/luasrc/lucid/http/handler/catchall.lua1
-rw-r--r--libs/lucid/hostfiles/etc/config/lucid15
-rw-r--r--libs/lucid/luasrc/lucid.lua11
3 files changed, 26 insertions, 1 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/handler/catchall.lua b/libs/lucid-http/luasrc/lucid/http/handler/catchall.lua
index 0523751bc..3b2c2b0a0 100644
--- a/libs/lucid-http/luasrc/lucid/http/handler/catchall.lua
+++ b/libs/lucid-http/luasrc/lucid/http/handler/catchall.lua
@@ -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"
diff --git a/libs/lucid/hostfiles/etc/config/lucid b/libs/lucid/hostfiles/etc/config/lucid
index 5a732ac53..934faa10e 100644
--- a/libs/lucid/hostfiles/etc/config/lucid
+++ b/libs/lucid/hostfiles/etc/config/lucid
@@ -58,4 +58,17 @@ config daemon rpc
option slave rpcd
list address 12900
list publisher mainrpc
- option enabled 1 \ No newline at end of file
+ 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'
+
+ \ No newline at end of file
diff --git a/libs/lucid/luasrc/lucid.lua b/libs/lucid/luasrc/lucid.lua
index 62741e79f..d72bf25ef 100644
--- a/libs/lucid/luasrc/lucid.lua
+++ b/libs/lucid/luasrc/lucid.lua
@@ -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")))