From 0586700467a5f91106d13bb0ad490b48726cc6d0 Mon Sep 17 00:00:00 2001 From: Cookie987 Date: Tue, 11 Mar 2025 16:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=85=A7Sourcery=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E7=9A=84=E5=BB=BA=E8=AE=AE=E4=BF=AE=E6=94=B9systemctl=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/manual_deploy_linux.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/manual_deploy_linux.md b/docs/manual_deploy_linux.md index 0a68c6da9..1dbd74692 100644 --- a/docs/manual_deploy_linux.md +++ b/docs/manual_deploy_linux.md @@ -120,6 +120,9 @@ sudo nano /etc/systemd/system/maimbot.service 输入以下内容: +``:你的maimbot目录 +``:你的venv环境(就是上文创建环境后,执行的代码`source maimbot/bin/activate`中source后面的路径的绝对路径) + ```ini [Unit] Description=MaiMbot 麦麦 @@ -127,8 +130,8 @@ After=network.target mongod.service [Service] Type=simple -WorkingDirectory=/path/to/your/maimbot/ -ExecStart=/path/to/your/venv/python3 bot.py +WorkingDirectory= +ExecStart=/python3 bot.py Restart=always RestartSec=10s @@ -136,7 +139,7 @@ RestartSec=10s WantedBy=multi-user.target ``` -输入以下命令重新加载 systemd: +输入以下命令重新加载systemd: ```bash sudo systemctl daemon-reload