mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 19:25:13 +08:00
💐 Sync 2026-05-25 21:11:41
This commit is contained in:
1 parent
2a3d740df7
commit
5807ae013e
67 files changed
+18444
-16259
No files matched your search
@@ -3,7 +3,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=0.0.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
LUCI_TITLE:=LuCI support for ghttpd
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local m, s
|
||||
|
||||
m = Map("ghttpd", translate("Ghttpd"), translate("Ghttpd"))
|
||||
m:section(SimpleSection).template = "ghttpd/ghttpd_status"
|
||||
m:section(SimpleSection).template = "ghttpd/status"
|
||||
|
||||
s=m:section(TypedSection, "ghttpd", translate("Global settings"))
|
||||
s.addremove=false
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
<%
|
||||
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"
|
||||
local sys = require "luci.sys"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
local running = (sys.call("pidof ghttpd >/dev/null") == 0)
|
||||
local port = uci:get("ghttpd", "config", "port") or "8333"
|
||||
-%>
|
||||
<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>
|
||||
<% if running then %>
|
||||
<button class="cbi-button cbi-button-success" disabled="true"><%:Ghttpd is running%></button>
|
||||
<% else %>
|
||||
<button class="cbi-button cbi-button-negative" disabled="true"><%:Mfun is not running%></button>
|
||||
<button class="cbi-button cbi-button-negative" disabled="true"><%:Ghttpd 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"> </label>
|
||||
<div class="cbi-value-field">
|
||||
<% if running then %>
|
||||
<div class="cbi-value cbi-value-last">
|
||||
<label class="cbi-value-title"> </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')">
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" name="start" value="<%:Open Ghttpd%>" onclick="window.open('http://'+location.hostname+':<%=port%>/', '_blank')">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in new issue
Block a user