From 1efc2ac7b97030c3f9d327b6963ec685dcc65c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=85=89-k?= <36470587+kxgx@users.noreply.github.com> Date: Thu, 9 Jan 2025 02:52:10 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20install.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/install.sh b/bin/install.sh index 6198c28..4751472 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,5 +1,11 @@ #!/bin/bash +# 确保脚本以root用户运行 +if [ "$EUID" -ne 0 ]; then + echo "Please run as root or with sudo." + exit +fi + # 设置默认的语言环境为英文(zh_CN.UTF-8),可以根据需要修改 DEFAULT_LANG="zh_CN.UTF-8"