Skip to content

Commit

Permalink
docs: 添加 systemd 服务配置说明到 README
Browse files Browse the repository at this point in the history
  • Loading branch information
krau committed Jan 22, 2025
1 parent 48ceb87 commit f00aa18
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ chmod +x saveany-bot
./saveany-bot
```

### 添加为 systemd 服务

创建文件 `/etc/systemd/system/saveany-bot.service` 并写入以下内容:

```
[Unit]
Description=SaveAnyBot
After=systemd-user-sessions.service
[Service]
Type=simple
WorkingDirectory=/yourpath/
ExecStart=/yourpath/saveany-bot
Restart=on-failure
[Install]
WantedBy=multi-user.target
```

设为开机启动并启动服务:

```bash
systemctl enable --now saveany-bot
```

## 更新

使用 `upgrade``up` 升级到最新版
Expand Down

0 comments on commit f00aa18

Please sign in to comment.