🐶 Sync 2026-06-07 20:35:32

This commit is contained in:
github-actions[bot] 2026-06-07 20:35:32 +08:00
parent a427b26104
commit fd4dfefb8d
8 changed files with 16 additions and 13 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gecoosac
PKG_VERSION:=2.2.20251015
PKG_RELEASE:=2
PKG_RELEASE:=3
ifeq ($(ARCH),aarch64)
PKG_ARCH:=ac_linux_arm64

View File

@ -1,7 +1,7 @@
config gecoosac 'config'
option enabled '0'
option port '60650'
option isonlyoneprot '0'
option isonlyoneprot '1'
option m_port '8080'
option https '0'
option crt_file '/etc/gecoosac/tls/gecoosac.crt'

View File

@ -23,7 +23,7 @@ init_conf() {
config_get "upload_dir" "config" "upload_dir" "$DEFAULT_UPLOAD_DIR"
config_get "enabled" "config" "enabled" "0"
config_get "port" "config" "port" "60650"
config_get "isonlyoneprot" "config" "isonlyoneprot" "0"
config_get "isonlyoneprot" "config" "isonlyoneprot" "1"
config_get "m_port" "config" "m_port" "8080"
config_get "https" "config" "https" "0"
config_get "crt_file" "config" "crt_file" "$DEFAULT_CRT_FILE"
@ -60,7 +60,7 @@ normalize_conf() {
is_port "$m_port" || m_port="8080"
[ "$enabled" = "1" ] || enabled="0"
[ "$isonlyoneprot" = "1" ] || isonlyoneprot="0"
[ "$isonlyoneprot" = "0" ] || isonlyoneprot="1"
[ "$https" = "1" ] || https="0"
case "$lang" in
zh|en) ;;

View File

@ -20,7 +20,7 @@ set_default() {
ensure_section
set_default enabled 0
set_default port 60650
set_default isonlyoneprot 0
set_default isonlyoneprot 1
set_default m_port 8080
set_default https 0
set_default crt_file /etc/gecoosac/tls/gecoosac.crt

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-gecoosac
PKG_VERSION:=2.2
PKG_RELEASE:=2
PKG_RELEASE:=3
LUCI_TITLE:=LuCI Support for gecoosac
LUCI_DEPENDS:=+luci-compat +gecoosac

View File

@ -3,6 +3,7 @@ module("luci.controller.gecoosac", package.seeall)
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci"
function index()
if not fs.access("/etc/config/gecoosac") then
@ -16,8 +17,10 @@ function index()
end
function act_status()
local cur = uci.cursor()
local enabled = cur:get("gecoosac", "config", "enabled") == "1"
local e = {
running = sys.call("/etc/init.d/gecoosac status >/dev/null 2>&1") == 0
running = enabled and sys.call("/etc/init.d/gecoosac status >/dev/null 2>&1") == 0
}
luci.http.prepare_content("application/json")
luci.http.write_json(e)

View File

@ -104,30 +104,30 @@ o.datatype = "port"
o.rmempty = false
o = s:option(Flag, "isonlyoneprot", translate("Single Port Mode"), translate("Do not enable the independent management port, only use one port for management."))
o.default = 0
o.default = 1
o.rmempty = false
o = s:option(Value, "m_port", translate("Set management port"))
o.placeholder = 8080
o.default = 8080
o.datatype = "port"
o:depends("isonlyoneprot", "0")
o:depends("isonlyoneprot", false)
o = s:option(Flag, "https", translate("Enable HTTPS service"), translate("A certificate file must be specified, otherwise it will fail to start."))
o.default = 0
o:depends("isonlyoneprot", "0")
o:depends("isonlyoneprot", false)
o = s:option(Value, "crt_file", translate("Specify crt certificate file"))
o.placeholder = DEFAULT_CRT_FILE
o.default = DEFAULT_CRT_FILE
o.validate = validate_abs_path
o:depends({isonlyoneprot = "0", https = "1"})
o:depends("https", true)
o = s:option(Value, "key_file", translate("Specify key certificate file"))
o.placeholder = DEFAULT_KEY_FILE
o.default = DEFAULT_KEY_FILE
o.validate = validate_abs_path
o:depends({isonlyoneprot = "0", https = "1"})
o:depends("https", true)
upload_dir = s:option(Value, "upload_dir", translate("Upload dir path"), translate("The path to upload AP upgrade firmware"))
upload_dir.placeholder = DEFAULT_UPLOAD_DIR

View File

@ -2,7 +2,7 @@
local uci=require"luci.model.uci".cursor()
local json=require"luci.jsonc"
local isonlyoneprot = uci:get("gecoosac", "config", "isonlyoneprot") or "0"
local isonlyoneprot = uci:get("gecoosac", "config", "isonlyoneprot") or "1"
local https = uci:get("gecoosac", "config", "https") or "0"
local port = uci:get("gecoosac", "config", "port") or "60650"
local m_port = uci:get("gecoosac", "config", "m_port") or "8080"