From 3c8f606d450e0adac379334dbf2c2d0cdacb5034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Wed, 23 Oct 2024 22:38:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E5=B1=82roo?= =?UTF-8?q?t=E7=94=A8=E6=88=B7=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/bootstrap/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/bootstrap/app.go b/internal/bootstrap/app.go index 170b9224..7beb3185 100644 --- a/internal/bootstrap/app.go +++ b/internal/bootstrap/app.go @@ -1,10 +1,15 @@ package bootstrap import ( + "os" "runtime/debug" ) func boot() { + if os.Geteuid() != 0 { + panic("panel must run as root") + } + debug.SetGCPercent(10) debug.SetMemoryLimit(64 << 20)