From 0b730417184e5b922ecb474083375f6b483473c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 4 Nov 2021 11:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81info=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2PID=E3=80=81=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E7=AD=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/admin_node.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/nodes/admin_node.go b/internal/nodes/admin_node.go index 83a3af32..4ef84eed 100644 --- a/internal/nodes/admin_node.go +++ b/internal/nodes/admin_node.go @@ -326,6 +326,16 @@ func (this *AdminNode) listenSock() error { case "demo": teaconst.IsDemoMode = !teaconst.IsDemoMode _ = cmd.ReplyOk() + case "info": + exePath, _ := os.Executable() + _ = cmd.Reply(&gosock.Command{ + Code: "info", + Params: map[string]interface{}{ + "pid": os.Getpid(), + "version": teaconst.Version, + "path": exePath, + }, + }) } })