From 321abc59cdb6b0c274da48cc9c52c12bce8d5799 Mon Sep 17 00:00:00 2001 From: user123 Date: Thu, 29 Jan 2026 02:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- moltbot/install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/moltbot/install.sh b/moltbot/install.sh index 5875a27..dba784d 100644 --- a/moltbot/install.sh +++ b/moltbot/install.sh @@ -14,14 +14,13 @@ PLAIN='\033[0m' # 配置文件路径 # Moltbot 依然使用 .clawdbot 目录以保持兼容性 -CONFIG_DIR="/root/.clawdbot" -CONFIG_FILE="${CONFIG_DIR}/moltbot.json" +CONFIG_DIR="${HOME}/.clawdbot" +CONFIG_FILE="${CONFIG_DIR}/clawdbot.json" SERVICE_FILE="/etc/systemd/system/moltbot.service" check_root() { if [ $EUID -ne 0 ]; then echo -e "${RED}错误: 请使用 root 用户运行此脚本!${PLAIN}" - echo -e "${YELLOW}提示: 请尝试使用 'sudo bash $0' 运行${PLAIN}" exit 1 fi } @@ -258,7 +257,7 @@ User=root ExecStart=$(command -v clawdbot) gateway --verbose Restart=always RestartSec=5 -Environment=HOME=/root +Environment=HOME=${HOME} [Install] WantedBy=multi-user.target