3 Commits

Author SHA1 Message Date
af970a77ed 降低python版本依赖 2024-10-03 00:59:49 +08:00
a579c76002 添加命令行工具 2024-10-03 00:27:39 +08:00
66d0782106 添加命令行工具 2024-10-03 00:24:53 +08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -33,15 +33,15 @@ Debian系请使用pipx安装
```bash
sudo apt install pipx
pipx install server-status
sudo pipx install server-status
```
## 🎉 使用
### 命令
- `server_status <server> <token> <id> run` - 运行客户端
- `server_status <server> <token> <id> rm` - 从服务端移除主机
- `server-status <server> <token> <id> run` - 运行客户端
- `server-status <server> <token> <id> rm` - 从服务端移除主机
#### 可选项
- `-n|--name` - 设置主机名称
@@ -60,6 +60,8 @@ server_status https://status.liteyuki.icu 114514 myhost run -n "MyHost" --labels
### 开机启动
执行以下命令
```shell
sudo pipx ensurepath # 确保pipx路径在环境变量下
sudo touch /etc/systemd/system/server-status-client.service
sudo bash -c 'cat <<EOF > /etc/systemd/system/server-status-client.service
@@ -69,7 +71,7 @@ After=network-online.target
[Service]
Type=simple
ExecStart=sudo server_status <server> <token> <id> run # 请替换为实际参数
ExecStart=server-status <server> <token> <id> run # 请替换为实际参数
Restart=on-failure
RestartSec=10

View File

@@ -10,7 +10,7 @@ dependencies = [
"psutil>=6.0.0",
"arclet-alconna>=1.8.30",
]
requires-python = ">=3.11"
requires-python = ">=3.10"
readme = "README.md"
license = { text = "MIT" }