diff options
-rw-r--r-- | libs/lucid-http/luasrc/lucid/http/handler/catchall.lua | 1 | ||||
-rw-r--r-- | libs/lucid/hostfiles/etc/config/lucid | 15 | ||||
-rw-r--r-- | libs/lucid/luasrc/lucid.lua | 11 |
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 0523751bc1..3b2c2b0a0c 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 5a732ac530..934faa10ed 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 62741e79f5..d72bf25ef9 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"))) |