Server status client
Project description
📖 介绍
服务器状态的客户端命令行工具
💿 安装
使用 pip 安装(确保包路径在环境变量下)
pip install server-status
Debian系请使用pipx安装
sudo apt install python3-pipx
pipx install server-status
🎉 使用
命令
server_status <server> <token> <id> run
- 运行客户端server_status <server> <token> <id> rm
- 从服务端移除主机
可选项
-n|--name
- 设置主机名称--labels
- 设置主机标签--interval
- 设置上报间隔--location
- 设置主机地域--link
- 设置前端点击跳转链接
示例
server_status https://status.liteyuki.icu 114514 myhost run -n "MyHost" --labels "标签1,标签2" --interval 5 --location "Chongqing" --link "https://example.com"
📝 其他
开机启动
执行以下命令
sudo touch /etc/systemd/system/server-status-client.service
sudo bash -c 'cat <<EOF > /etc/systemd/system/server-status-client.service
[Unit]
Description=Server Status Client
After=network-online.target
[Service]
Type=simple
ExecStart=sudo server_status <server> <token> <id> run # 请替换为实际参数
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF'
sudo systemctl enable server-status-client
sudo systemctl start server-status-client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
server_status-0.1.4.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for server_status-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 148fbc0b42b8c9f8bb7cb17b15dfa71ebed23e9cf449deebe9ce3da772d930f7 |
|
MD5 | c1c221d1a999128c49339f3a2b2ae01c |
|
BLAKE2b-256 | aa1dab7be3d6a343831738b25d8e45978affe1ca6d9760482efa290ec3910783 |