LuCIttpd configuration pages
authorSteven Barth <steven@midlink.org>
Sun, 14 Dec 2008 11:54:49 +0000 (11:54 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 14 Dec 2008 11:54:49 +0000 (11:54 +0000)
i18n/english/luasrc/i18n/admin-core.en.lua
i18n/german/luasrc/i18n/admin-core.de.lua
modules/admin-full/luasrc/controller/admin/services.lua
modules/admin-full/luasrc/model/cbi/admin_services/lucittpd.lua [new file with mode: 0644]

index 64729f8..5035906 100644 (file)
@@ -96,6 +96,10 @@ a_srv_http_authrealm = 'Authentication Realm'
 a_srv_http_authrealm1 = 'The realm which will be displayed at the authentication prompt for protected pages.'
 a_srv_http_config1 = 'defaults to <code>/etc/httpd.conf</code>'
 a_srv_http_root = 'Document root'
 a_srv_http_authrealm1 = 'The realm which will be displayed at the authentication prompt for protected pages.'
 a_srv_http_config1 = 'defaults to <code>/etc/httpd.conf</code>'
 a_srv_http_root = 'Document root'
+a_srv_http_keepalive = 'Enable Keep-Alive'
+a_srv_http_timeout = 'Connection timeout'
+a_srv_http_path = 'Plugin path'
+a_srv_lucittpd = 'A lightweight HTTP/1.1 webserver written in C and Lua designed to serve LuCI'
 a_srv_dropbear1 = 'Dropbear offers <abbr title="Secure Shell">SSH</abbr> network shell access and an integrated <abbr title="Secure Copy">SCP</abbr> server'
 a_srv_d_pwauth = 'Password authentication'
 a_srv_d_pwauth1 = 'Allow <abbr title="Secure Shell">SSH</abbr> password authentication'
 a_srv_dropbear1 = 'Dropbear offers <abbr title="Secure Shell">SSH</abbr> network shell access and an integrated <abbr title="Secure Copy">SCP</abbr> server'
 a_srv_d_pwauth = 'Password authentication'
 a_srv_d_pwauth1 = 'Allow <abbr title="Secure Shell">SSH</abbr> password authentication'
index a5280cc..c0acee8 100644 (file)
@@ -94,6 +94,10 @@ a_srv_http_authrealm = 'Anmeldeaufforderung'
 a_srv_http_authrealm1 = 'Aufforderungstext zum Anmelden im Administrationsbereich'
 a_srv_http_config1 = '/etc/httpd.conf wenn leer'
 a_srv_http_root = 'Wurzelverzeichnis'
 a_srv_http_authrealm1 = 'Aufforderungstext zum Anmelden im Administrationsbereich'
 a_srv_http_config1 = '/etc/httpd.conf wenn leer'
 a_srv_http_root = 'Wurzelverzeichnis'
+a_srv_http_keepalive = 'Keep-Alive aktivieren'
+a_srv_http_timeout = 'Verbindungszeitlimit'
+a_srv_http_path = 'Pluginpfad'
+a_srv_lucittpd = 'Ein schlanker HTTP/1.1 webserver in C und Lua geschrieben um LuCI zu betreiben.'
 a_srv_services1 = 'Dienste und Dämonen stellen bestimmte Funktionalitäten auf dem Router zur Verfügung.'
 a_srv_services2 = 'Es handelt sich hierbei meist um Netzwerkserver, die verschiedene Aufgaben auf dem Router erfüllen, beispielsweise Shell-Zugang ermöglichen oder diese Weboberfläche per HTTP anbieten.'
 a_st_i_status1 = 'Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise Prozessortakt, Speicherauslastung und Netzwerkschnittstellen.'
 a_srv_services1 = 'Dienste und Dämonen stellen bestimmte Funktionalitäten auf dem Router zur Verfügung.'
 a_srv_services2 = 'Es handelt sich hierbei meist um Netzwerkserver, die verschiedene Aufgaben auf dem Router erfüllen, beispielsweise Shell-Zugang ermöglichen oder diese Weboberfläche per HTTP anbieten.'
 a_st_i_status1 = 'Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise Prozessortakt, Speicherauslastung und Netzwerkschnittstellen.'
index f7bdb02..a137377 100644 (file)
@@ -28,10 +28,19 @@ function index()
        page.order  = 40
        page.index  = true
        
        page.order  = 40
        page.index  = true
        
-       local page  = node("admin", "services", "httpd")
-       page.target = cbi("admin_services/httpd")
-       page.title  = "Busybox HTTPd"
-       page.order  = 10
+       if luci.fs.access("/etc/config/lucittpd") then
+               local page  = node("admin", "services", "lucittpd")
+               page.target = cbi("admin_services/lucittpd")
+               page.title  = "LuCIttpd"
+               page.order  = 10
+       end
+
+       if luci.fs.access("/etc/config/httpd") then
+               local page  = node("admin", "services", "httpd")
+               page.target = cbi("admin_services/httpd")
+               page.title  = "Busybox HTTPd"
+               page.order  = 11
+       end
        
        local page  = node("admin", "services", "dropbear")
        page.target = cbi("admin_services/dropbear")
        
        local page  = node("admin", "services", "dropbear")
        page.target = cbi("admin_services/dropbear")
diff --git a/modules/admin-full/luasrc/model/cbi/admin_services/lucittpd.lua b/modules/admin-full/luasrc/model/cbi/admin_services/lucittpd.lua
new file mode 100644 (file)
index 0000000..35d8650
--- /dev/null
@@ -0,0 +1,25 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("lucittpd", "LuCIttpd", translate("a_srv_lucittpd"))
+
+s = m:section(NamedSection, "lucittpd", "lucittpd", "")
+
+s:option(Value, "port", translate("port"))
+s:option(Value, "root", translate("a_srv_http_root"))
+s:option(Value, "path", translate("a_srv_http_path"))
+s:option(Flag, "keepalive", translate("a_srv_http_keepalive"))
+s:option(Value, "timeout", translate("a_srv_http_timeout"))
+
+return m