mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 05:15:14 +08:00
🎨 Sync 2026-03-15 23:41:50
This commit is contained in:
1 parent
8e54258038
commit
ed344926ae
2 files changed
+10
-3
No files matched your search
@@ -147,7 +147,10 @@ start_service() {
|
||||
fi
|
||||
|
||||
local config_file='/etc/adguardhome/adguardhome.yaml'
|
||||
local gc=0
|
||||
local group='adguardhome'
|
||||
local maxprocs=0
|
||||
local memlimit=0
|
||||
local user='adguardhome'
|
||||
local verbose=0
|
||||
local work_dir='/var/lib/adguardhome'
|
||||
@@ -191,6 +194,9 @@ start_service() {
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command "$PROG"
|
||||
[ "$gc" -le 0 ] || procd_append_param env GOGC="$gc"
|
||||
[ "$maxprocs" -le 0 ] || procd_append_param env GOMAXPROCS="$maxprocs"
|
||||
[ "$memlimit" -le 0 ] || procd_append_param env GOMEMLIMIT="$memlimit"
|
||||
procd_append_param command --config "$config_file"
|
||||
procd_append_param command --logfile syslog
|
||||
procd_append_param command --no-check-update
|
||||
@@ -217,6 +223,7 @@ start_service() {
|
||||
procd_add_jail_mount /etc/hosts
|
||||
procd_add_jail_mount /etc/ssl/certs
|
||||
config_list_foreach config jail_mount procd_add_jail_mount
|
||||
config_list_foreach config jail_mount_rw procd_add_jail_mount_rw
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ end
|
||||
|
||||
-- Shunt Start
|
||||
if (has_singbox or has_xray) and #nodes_table > 0 then
|
||||
if #normal_list > 0 then
|
||||
if #normal_list > 0 or #iface_list > 0 then
|
||||
current_node_id = m.uci:get(appname, global_cfgid, "tcp_node")
|
||||
current_node = current_node_id and m.uci:get_all(appname, current_node_id) or {}
|
||||
if current_node.protocol == "_shunt" then
|
||||
@@ -163,7 +163,7 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
||||
})
|
||||
end
|
||||
else
|
||||
local tips = s:taboption("Main", DummyValue, "tips", " ")
|
||||
local tips = s:taboption("Main", DummyValue, "tips", " ")
|
||||
tips.rawhtml = true
|
||||
tips.cfgvalue = function(t, n)
|
||||
return string.format('<a style="color: red">%s</a>', translate("There are no available nodes, please add or subscribe nodes first."))
|
||||
@@ -796,7 +796,7 @@ for k, v in pairs(socks_list) do
|
||||
udp.group[#udp.group+1] = (v.group and v.group ~= "") and v.group or translate("default")
|
||||
end
|
||||
for k, v in pairs(nodes_table) do
|
||||
if #normal_list == 0 then
|
||||
if #normal_list == 0 and #iface_list == 0 then
|
||||
break
|
||||
end
|
||||
if v.protocol == "_shunt" then
|
||||
|
||||
Reference in new issue
Block a user