LuCId
This commit is contained in:
parent
de9849b2d9
commit
f7deae100d
5 changed files with 39 additions and 85 deletions
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ "$(date +%M | cut -c2)" == "5" ] && luci-splash sync
|
|
|
@ -47,6 +47,23 @@ whitelist_add() {
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
### We are started by the firewall include
|
### We are started by the firewall include
|
||||||
|
|
||||||
|
uci get lucid.splashr || {
|
||||||
|
uci batch <<EOF
|
||||||
|
set lucid.splashr=daemon
|
||||||
|
set lucid.splashr.slave=httpd
|
||||||
|
add_list lucid.splashr.address=8082
|
||||||
|
add_list lucid.splashr.publisher=splashredir
|
||||||
|
set lucid.splashr.enabled=1
|
||||||
|
|
||||||
|
set lucid.splashredir=Redirector
|
||||||
|
set lucid.splashredir.name=Splashd
|
||||||
|
set lucid.splashredir.virtual='/'
|
||||||
|
set lucid.splashredir.physical=':80/luci/splash'
|
||||||
|
|
||||||
|
commit lucid
|
||||||
|
EOF
|
||||||
|
}
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,9 +99,6 @@ start() {
|
||||||
grep -q luci-splash /etc/crontabs/root || {
|
grep -q luci-splash /etc/crontabs/root || {
|
||||||
echo '*/5 * * * * /usr/sbin/luci-splash sync' >> /etc/crontabs/root
|
echo '*/5 * * * * /usr/sbin/luci-splash sync' >> /etc/crontabs/root
|
||||||
}
|
}
|
||||||
|
|
||||||
### Start the splash httpd
|
|
||||||
start-stop-daemon -S -m -p /var/run/luci-splashd.pid -b -q -x /usr/bin/luci-splashd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
@ -101,9 +115,6 @@ stop() {
|
||||||
iptables -t nat -X luci_splash_leases
|
iptables -t nat -X luci_splash_leases
|
||||||
iptables -t nat -X luci_splash_portal
|
iptables -t nat -X luci_splash_portal
|
||||||
iptables -t nat -X luci_splash_prerouting
|
iptables -t nat -X luci_splash_prerouting
|
||||||
|
|
||||||
### Stop the splash httpd
|
|
||||||
start-stop-daemon -K -p /var/run/luci-splashd.pid -s KILL -q
|
|
||||||
|
|
||||||
sed -ie '/\/usr\/sbin\/luci-splash sync/d' /var/spool/cron/crontabs/root
|
sed -ie '/\/usr\/sbin\/luci-splash sync/d' /var/spool/cron/crontabs/root
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/lua
|
|
||||||
|
|
||||||
local nixio = require "nixio", require "nixio.util"
|
|
||||||
local server = nixio.bind(nil, arg[1] or 8082)
|
|
||||||
local stat = server:listen(32)
|
|
||||||
|
|
||||||
local function remapipv6(adr)
|
|
||||||
local map = "::ffff:"
|
|
||||||
if adr:sub(1, #map) == map then
|
|
||||||
return adr:sub(#map+1)
|
|
||||||
else
|
|
||||||
return adr
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
while stat do
|
|
||||||
local client = server:accept()
|
|
||||||
|
|
||||||
if client then
|
|
||||||
client:setopt("socket", "rcvtimeo", 1)
|
|
||||||
client:setopt("socket", "sndtimeo", 1)
|
|
||||||
local srv = remapipv6(client:getsockname())
|
|
||||||
|
|
||||||
client:read(1024)
|
|
||||||
client:writeall("HTTP/1.1 302 Found\r\nLocation: http://" .. srv ..
|
|
||||||
(arg[2] or "/luci/splash") .. "\r\nContent-Length: 0\r\nConnection: close\r\n\r\n")
|
|
||||||
client:close()
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -231,6 +231,18 @@ define Package/luci-luanet/install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/luci-lucid
|
||||||
|
$(call Package/luci/libtemplate)
|
||||||
|
TITLE:=LuCId Superserver
|
||||||
|
DEPENDS+=+luci-nixio +luci-http
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/luci-lucid/install
|
||||||
|
$(call Package/luci/install/template,$(1),libs/lucid)
|
||||||
|
$(call Package/luci/install/template,$(1),libs/lucid-http)
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NIXIO_TLS:=axtls
|
NIXIO_TLS:=axtls
|
||||||
|
|
||||||
|
@ -277,7 +289,7 @@ endef
|
||||||
|
|
||||||
define Package/luci-web
|
define Package/luci-web
|
||||||
$(call Package/luci/libtemplate)
|
$(call Package/luci/libtemplate)
|
||||||
DEPENDS+=+luci-http +luci-sys +luci-uci +luci-sgi-cgi
|
DEPENDS+=+luci-http +luci-sys +luci-uci +luci-lucid
|
||||||
TITLE:=MVC Webframework
|
TITLE:=MVC Webframework
|
||||||
$(call Config,luci.main.lang,string,en,Default Language)
|
$(call Config,luci.main.lang,string,en,Default Language)
|
||||||
endef
|
endef
|
||||||
|
@ -322,7 +334,7 @@ endef
|
||||||
define Package/luci-freifunk-community
|
define Package/luci-freifunk-community
|
||||||
$(call Package/luci/fftemplate)
|
$(call Package/luci/fftemplate)
|
||||||
DEPENDS+= \
|
DEPENDS+= \
|
||||||
+luci-sgi-cgi +luci-app-splash \
|
+luci-lucid +luci-app-splash \
|
||||||
+luci-app-ffwizard-leipzig \
|
+luci-app-ffwizard-leipzig \
|
||||||
+luci-i18n-german \
|
+luci-i18n-german \
|
||||||
+PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
|
+PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \
|
||||||
|
@ -664,25 +676,6 @@ define Package/luci-sgi-cgi/install
|
||||||
$(call Package/luci/install/template,$(1),libs/sgi-cgi)
|
$(call Package/luci/install/template,$(1),libs/sgi-cgi)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luci-sgi-luci
|
|
||||||
$(call Package/luci/libtemplate)
|
|
||||||
DEPENDS+=+luci-httpd
|
|
||||||
TITLE:=SGI for LuCIttpd
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/luci-sgi-luci/install
|
|
||||||
$(call Package/luci/install/template,$(1),libs/sgi-luci)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/luci-sgi-webuci
|
|
||||||
$(call Package/luci/libtemplate)
|
|
||||||
TITLE:=SGI for Webuci
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/luci-sgi-webuci/install
|
|
||||||
$(call Package/luci/install/template,$(1),libs/sgi-webuci)
|
|
||||||
endef
|
|
||||||
|
|
||||||
### Themes ###
|
### Themes ###
|
||||||
define Package/luci-theme-base
|
define Package/luci-theme-base
|
||||||
$(call Package/luci/thtemplate)
|
$(call Package/luci/thtemplate)
|
||||||
|
@ -863,6 +856,9 @@ endif
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-luanet),)
|
ifneq ($(CONFIG_PACKAGE_luci-luanet),)
|
||||||
PKG_SELECTED_MODULES+=libs/luanet
|
PKG_SELECTED_MODULES+=libs/luanet
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CONFIG_PACKAGE_luci-lucid),)
|
||||||
|
PKG_SELECTED_MODULES+=libs/lucid libs/lucid-http
|
||||||
|
endif
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-nixio),)
|
ifneq ($(CONFIG_PACKAGE_luci-nixio),)
|
||||||
PKG_SELECTED_MODULES+=libs/nixio
|
PKG_SELECTED_MODULES+=libs/nixio
|
||||||
endif
|
endif
|
||||||
|
@ -1046,6 +1042,7 @@ $(eval $(call BuildPackage,luci-httpclient))
|
||||||
$(eval $(call BuildPackage,luci-ipkg))
|
$(eval $(call BuildPackage,luci-ipkg))
|
||||||
$(eval $(call BuildPackage,luci-json))
|
$(eval $(call BuildPackage,luci-json))
|
||||||
$(eval $(call BuildPackage,luci-luanet))
|
$(eval $(call BuildPackage,luci-luanet))
|
||||||
|
$(eval $(call BuildPackage,luci-lucid))
|
||||||
$(eval $(call BuildPackage,luci-nixio))
|
$(eval $(call BuildPackage,luci-nixio))
|
||||||
$(eval $(call BuildPackage,luci-uci))
|
$(eval $(call BuildPackage,luci-uci))
|
||||||
$(eval $(call BuildPackage,luci-sys))
|
$(eval $(call BuildPackage,luci-sys))
|
||||||
|
@ -1086,8 +1083,6 @@ $(eval $(call BuildPackage,luci-app-polipo))
|
||||||
$(eval $(call BuildPackage,luci-app-openvpn))
|
$(eval $(call BuildPackage,luci-app-openvpn))
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luci-sgi-cgi))
|
$(eval $(call BuildPackage,luci-sgi-cgi))
|
||||||
$(eval $(call BuildPackage,luci-sgi-luci))
|
|
||||||
$(eval $(call BuildPackage,luci-sgi-webuci))
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luci-theme-base))
|
$(eval $(call BuildPackage,luci-theme-base))
|
||||||
$(eval $(call BuildPackage,luci-theme-fledermaus))
|
$(eval $(call BuildPackage,luci-theme-fledermaus))
|
||||||
|
|
|
@ -2,7 +2,7 @@ config lucid main
|
||||||
option pollinterval 15000
|
option pollinterval 15000
|
||||||
option threadlimit 25
|
option threadlimit 25
|
||||||
option daemon 1
|
option daemon 1
|
||||||
option debug 1
|
option debug 0
|
||||||
list supports tcpserver
|
list supports tcpserver
|
||||||
list supports server
|
list supports server
|
||||||
|
|
||||||
|
@ -11,51 +11,30 @@ config DirectoryPublisher webroot
|
||||||
option physical /www
|
option physical /www
|
||||||
option virtual /
|
option virtual /
|
||||||
option domain ''
|
option domain ''
|
||||||
list read ':lo'
|
|
||||||
list read ':br-lan'
|
|
||||||
list read 'root'
|
|
||||||
|
|
||||||
config LuciWebPublisher luciweb
|
config LuciWebPublisher luciweb
|
||||||
option name 'LuCI Webapplication'
|
option name 'LuCI Webapplication'
|
||||||
option physical ''
|
option physical ''
|
||||||
list virtual /luci
|
list virtual /luci
|
||||||
|
list virtual /cgi-bin/luci
|
||||||
option domain ''
|
option domain ''
|
||||||
list exec ':lo'
|
|
||||||
list exec ':br-lan'
|
|
||||||
list exec 'root'
|
|
||||||
|
|
||||||
config RPCPublisher mainrpc
|
|
||||||
option namespace 'luci.lucid.rpc'
|
|
||||||
list export system
|
|
||||||
list exec ':lo'
|
|
||||||
list exec 'root'
|
|
||||||
|
|
||||||
config tcpserver httpd
|
config tcpserver httpd
|
||||||
option entrypoint "luci.lucid.http"
|
option entrypoint "luci.lucid.http"
|
||||||
list supports DirectoryPublisher
|
list supports DirectoryPublisher
|
||||||
list supports LuciWebPublisher
|
list supports LuciWebPublisher
|
||||||
|
|
||||||
config tcpserver rpcd
|
|
||||||
option entrypoint "luci.lucid.rpc"
|
|
||||||
list supports RPCPublisher
|
|
||||||
|
|
||||||
config daemon http
|
config daemon http
|
||||||
option slave httpd
|
option slave httpd
|
||||||
list address 8080
|
list address 80
|
||||||
list publisher webroot
|
list publisher webroot
|
||||||
list publisher luciweb
|
list publisher luciweb
|
||||||
option enabled 1
|
option enabled 1
|
||||||
|
|
||||||
config daemon https
|
config daemon https
|
||||||
option slave httpd
|
option slave httpd
|
||||||
list address 4443
|
list address 443
|
||||||
list publisher webroot
|
list publisher webroot
|
||||||
list publisher luciweb
|
list publisher luciweb
|
||||||
option enabled 1
|
option enabled 1
|
||||||
option encryption enable
|
option encryption enable
|
||||||
|
|
||||||
config daemon rpc
|
|
||||||
option slave rpcd
|
|
||||||
list address 12900
|
|
||||||
list publisher mainrpc
|
|
||||||
option enabled 1
|
|
Loading…
Reference in a new issue