mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Wed Nov 20 19:36:24 CET 2024
This commit is contained in:
@@ -213,7 +213,12 @@ end
|
||||
|
||||
function index_status()
|
||||
local e = {}
|
||||
e.dns_mode_status = luci.sys.call("netstat -apn | grep ':15353 ' >/dev/null") == 0
|
||||
local dns_shunt = uci:get(appname, "@global[0]", "dns_shunt") or "dnsmasq"
|
||||
if dns_shunt == "smartdns" then
|
||||
e.dns_mode_status = luci.sys.call("pidof smartdns >/dev/null") == 0
|
||||
else
|
||||
e.dns_mode_status = luci.sys.call("netstat -apn | grep ':15353 ' >/dev/null") == 0
|
||||
end
|
||||
e.haproxy_status = luci.sys.call(string.format("/bin/busybox top -bn1 | grep -v grep | grep '%s/bin/' | grep haproxy >/dev/null", appname)) == 0
|
||||
e["tcp_node_status"] = luci.sys.call("/bin/busybox top -bn1 | grep -v 'grep' | grep '/tmp/etc/passwall/bin/' | grep 'default' | grep 'TCP' >/dev/null") == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user