✨ Sync 2026-04-22 04:42:14

This commit is contained in:
github-actions[bot] committed 2026-04-22 04:42:14 +08:00
1 parent 9637c56cbd
commit 8541cb3d03
17 files changed
+275 -43

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
include $(TOPDIR)/rules.mk
PKG_VERSION:=0.0.1
PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for ghttpd
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+ghttpd
define Package/luci-app-ghttpd/conffiles
/etc/config/ghttpd
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
+7
View File
@@ -0,0 +1,7 @@
module("luci.controller.ghttpd", package.seeall)
function index()
entry({"admin", "services", "ghttpd"}, alias("admin", "services", "ghttpd", "config"), _("Ghttpd"), 31).dependent = true
entry({"admin", "services", "ghttpd", "config"}, cbi("ghttpd"))
end
@@ -0,0 +1,21 @@
local m, s
m = Map("ghttpd", translate("Ghttpd"), translate("Ghttpd"))
m:section(SimpleSection).template = "ghttpd/ghttpd_status"
s=m:section(TypedSection, "ghttpd", translate("Global settings"))
s.addremove=false
s.anonymous=true
e = s:option(Flag, "enabled", translate("Enable"))
e.rmempty=false
o = s:option(Value, "port", translate("HTTP Port").."<b>*</b>")
o.rmempty = false
o.default = "8990"
o.datatype = "port"
return m
@@ -0,0 +1,31 @@
<%
local util = require "luci.util"
local container_status = util.trim(util.exec("/usr/libexec/istorec/mfun.sh status"))
local container_install = (string.len(container_status) > 0)
local container_running = container_status == "running"
-%>
<div class="cbi-value">
<label class="cbi-value-title"><%:Status%></label>
<div class="cbi-value-field">
<% if container_running then %>
<button class="cbi-button cbi-button-success" disabled="true"><%:Mfun is running%></button>
<% else %>
<button class="cbi-button cbi-button-negative" disabled="true"><%:Mfun is not running%></button>
<% end %>
</div>
</div>
<%
if container_running then
local port=util.trim(util.exec("/usr/libexec/istorec/mfun.sh port"))
if port == "" then
port="8990"
end
-%>
<div class="cbi-value cbi-value-last">
<label class="cbi-value-title">&nbsp;</label>
<div class="cbi-value-field">
<input type="button" class="btn cbi-button cbi-button-apply" name="start" value="<%:Open Mfun%>" onclick="window.open('http://'+location.hostname+':<%=port%>/', '_blank')">
</div>
</div>
<% end %>