mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-09 06:07:44 +08:00
⛄ Sync 2023-02-21 16:00:08
This commit is contained in:
parent
6f4d550cb9
commit
ab5c229431
@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=UnblockNeteaseMusic
|
||||
PKG_BASE_VERSION:=0.27.0
|
||||
PKG_RELEASE:=198
|
||||
PKG_RELEASE:=199
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/UnblockNeteaseMusic/server.git
|
||||
PKG_SOURCE_DATE:=2022-10-09
|
||||
PKG_SOURCE_VERSION:=130be8fb7f0b086197a969a73ea7a32d706458fa
|
||||
PKG_SOURCE_VERSION:=21942ad6780e3eb6ff22f1a16ef0e8aa07658ae3
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
|
@ -12,6 +12,7 @@ function act_status()
|
||||
local e={}
|
||||
e.running=luci.sys.call("pgrep nezha-agent >/dev/null")==0
|
||||
e.enabled=luci.sys.exec("uci get nezha-agent.config.enabled")
|
||||
e.tls=luci.sys.exec("uci get nezha-agent.config.tls")
|
||||
|
||||
luci.sys.call("/etc/init.d/nezha-agent enable")
|
||||
-- e.port=luci.sys.exec("uci get nezha-agent.config.port")
|
||||
|
@ -21,6 +21,9 @@ s.anonymous = true
|
||||
enable = s:option(Flag, "enabled", translate("启用"))
|
||||
enable.rmempty = false
|
||||
|
||||
tls = s:option(Flag, "tls", translate("使用TLS"))
|
||||
tls.rmempty = false
|
||||
|
||||
o = s:option(Value, "host", translate("面板RPC Host:Port"))
|
||||
o.datatype = "hostport"
|
||||
o.placeholder = "localhost:5555"
|
||||
|
@ -5,13 +5,19 @@ START=90
|
||||
STOP=10
|
||||
|
||||
enabled="$(uci get nezha-agent.config.enabled)"
|
||||
tls="$(uci get nezha-agent.config.tls)"
|
||||
host="$(uci get nezha-agent.config.host)"
|
||||
secret="$(uci get nezha-agent.config.secret)"
|
||||
|
||||
start_service() {
|
||||
[ "$enabled" == "1" ] || exit 0
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/bin/nezha-agent -s "${host}" -p "${secret}" -d
|
||||
if [ "$tls" == "1" ]
|
||||
then
|
||||
procd_set_param command /usr/bin/nezha-agent -s "${host}" -p "${secret}" -d --tls
|
||||
else
|
||||
procd_set_param command /usr/bin/nezha-agent -s "${host}" -p "${secret}" -d
|
||||
fi
|
||||
procd_set_param respawn
|
||||
[ -e /proc/sys/kernel/core_pattern ] && {
|
||||
procd_set_param limits core="unlimited"
|
||||
|
Loading…
Reference in New Issue
Block a user