update 2022-06-23 20:19:02

This commit is contained in:
github-actions[bot] 2022-06-23 20:19:02 +08:00
parent 9112733de5
commit 986176f490
8 changed files with 31 additions and 25 deletions

View File

@ -14,7 +14,7 @@ PKG_VERSION:=1.5.1
PKG_RELEASE:=$(PKG_ARCH_DDNSTO)-3
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/ddnsto/
PKG_HASH:=a73502a5ffb13cca36e9e0a3a40b88ec261e5dbc48fc2c86c3e32b05515752dc
PKG_HASH:=b0a7753acc29d6257a3831bb24dc83457d8c78e05134b0395f88fea85524d10c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for ddnsto
LUCI_DEPENDS:=+ddnsto
LUCI_PKGARCH:=all
PKG_VERSION:=1.5.1
PKG_RELEASE:=1
PKG_RELEASE:=4
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -6,7 +6,7 @@ function index()
return
end
entry({"admin","services", "ddnsto"}, call("redirect_index"), _("DDNSTO"), 20).dependent = true
entry({"admin","services", "ddnsto"}, call("redirect_index"), _("DDNSTO 远程控制"), 20).dependent = true
entry({"admin","services", "ddnsto", "pages"}, call("ddnsto_index")).leaf = true
if nixio.fs.access("/usr/lib/lua/luci/view/ddnsto/main_dev.htm") then
entry({"admin","services", "ddnsto", "dev"}, call("ddnsto_dev")).leaf = true
@ -106,8 +106,7 @@ local function status_container()
labels = {
{
key = "服务状态",
value = running,
tt = non_system_mounts
value = running
},
{
key = "插件版本",
@ -141,7 +140,7 @@ local function status_container()
value = "<a href=\"https://www.ddnsto.com/app/#/devices\" target=\"_blank\">点击前往DDNSTO控制台</a>"
}
},
title = "DDNSTO 服务状态"
title = "服务状态"
}
return c1
end
@ -245,6 +244,7 @@ local function feat_container()
name = "feat_disk_path_selected",
enum = getBlockDevices(),
enumNames = getBlockDevices(),
required = true,
title = "共享磁盘",
type = "string",
["ui:hidden"] = "{{rootValue.feat_enabled !== true }}"
@ -275,7 +275,7 @@ local function get_schema()
actions = actions,
containers = get_containers(),
description = "DDNSTO远程控制是Koolcenter小宝开发的支持http2的远程穿透控制插件。<br />\n 支持通过浏览器访问自定义域名访问内网设备后台、远程RDP/VNC桌面、远程文件管理等多种功能。<br />\n 详情请查看 <a href=\"https://www.ddnsto.com/\" target=\"_blank\">https://www.ddnsto.com</a>",
title = "ddnsto"
title = "DDNSTO 远程控制"
}
return schema
end
@ -322,11 +322,8 @@ function ddnsto_submit()
success = -1000
error = "请填写正确用户Token令牌"
end
if req.enabled == false then
req.feat_enabled = false
end
if string.find(req.token, " ") then
if req.token ~= nil and string.find(req.token, " ") then
success = -1000
error = "令牌勿包含空格"
end
@ -336,6 +333,7 @@ function ddnsto_submit()
end
if req.feat_enabled == true then
if (req.feat_port == nil or tonumber(req.feat_port) == nil or req.feat_port == 0) then
success = -1000
error = "请填写正确的端口"
@ -391,7 +389,7 @@ function ddnsto_submit()
end
x:set("ddnsto","@ddnsto[0]","feat_enabled",f_enabled)
local port = 3030
local port = 3033
if req.feat_port ~= nil then
port = req.feat_port
end
@ -409,7 +407,7 @@ function ddnsto_submit()
end
x:set("ddnsto","@ddnsto[0]","feat_password",password)
local path = req.feat_disk_path_selected
local path = ""
if req.feat_disk_path_selected ~= nil then
path = trim(req.feat_disk_path_selected)
end
@ -424,7 +422,9 @@ function ddnsto_submit()
log = log .. "请关闭对话框\n"
ddnsto_writelog(log)
luci.util.exec("/etc/init.d/ddnsto restart")
luci.util.exec("/etc/init.d/ddnsto stop")
luci.util.exec("sleep 1")
luci.util.exec("/etc/init.d/ddnsto start")
luci.util.exec("sleep 1")
else
log = log .. "参数错误:\n"

View File

@ -1,7 +1,13 @@
<%+header%>
<script>
(function(){
})();
window.IstoreosFormEnv = {
getApi: '/cgi-bin/luci/admin/services/ddnsto/form/',
logApi: '/cgi-bin/luci/admin/services/ddnsto/log',
submitApi: '/cgi-bin/luci/admin/services/ddnsto/submit/'
}
</script>
<div id="app">
</div>

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ end
function act_status()
local e = {}
e.running = luci.sys.call("ps -w |grep unblockneteasemusic |grep app.js |grep -v grep >/dev/null") == 0
e.running = luci.sys.call("busybox ps -w |grep unblockneteasemusic |grep app.js |grep -v grep >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -58,7 +58,7 @@ echo -e "\n"
echo -e "Running info:"
procd_running_status="$(/etc/init.d/unblockneteasemusic status)"
echo -e "PROCD running status: $procd_running_status"
[ "$procd_running_status" = "running" ] && { ps -w | grep "unblockneteasemusic" | grep "app\.js" || echo -e "Thread is not found."; }
[ "$procd_running_status" = "running" ] && { busybox ps -w | grep "unblockneteasemusic" | grep "app\.js" || echo -e "Thread is not found."; }
echo -e "\n"
[ "$procd_running_status" != "running" ] || {

View File

@ -5,7 +5,7 @@
NAME="unblockneteasemusic"
check_core_if_already_running(){
running_tasks="$(ps -w |grep "$NAME" |grep "update.sh" |grep "update_core" |grep -v "grep" |awk '{print $1}' |wc -l)"
running_tasks="$(busybox ps -w |grep "$NAME" |grep "update.sh" |grep "update_core" |grep -v "grep" |awk '{print $1}' |wc -l)"
[ "${running_tasks}" -gt "2" ] && { echo -e "\nA task is already running." >> "/tmp/$NAME.log"; exit 2; }
}