修复README
This commit is contained in:
parent
0f68dfb319
commit
28cb40ad28
42
README.md
42
README.md
@ -1,41 +1,49 @@
|
||||
## 核云IDC服务商VPS自动监测重启程序
|
||||
|
||||
### API接口信息
|
||||
- 获取登录Token
|
||||
`https://www.heyunidc.cn/v1/login_api?account={phone number/email acc}&password={API KEY}`
|
||||
备注:POST方法
|
||||
- 获取VPS列表
|
||||
`https://www.heyunidc.cn/v1/hosts?page=1&limit=100`
|
||||
备注:GET方法,使用"Authorization: JWT {Token}"进行认证
|
||||
注意:若您的VPS数量超过100,需要更改limit数量
|
||||
- 获取VPS状态
|
||||
`https://www.heyunidc.cn/v1/hosts/{id}/module/status?type=host`
|
||||
备注:GET方法,使用"Authorization: JWT {Token}"进行认证
|
||||
- 操作VPS
|
||||
`PUT https://www.heyunidc.cn/v1/hosts/:id/module/hard_reboot`
|
||||
备注:PUT方法,使用"Authorization: JWT {Token}"进行认证
|
||||
操作类型:hard_reboot - 硬重启,on - 开机,off - 关机,reboot - 重启
|
||||
|
||||
- **获取登录Token**
|
||||
`https://www.heyunidc.cn/v1/login_api?account={phone number/email acc}&password={API KEY}`
|
||||
备注:POST方法
|
||||
|
||||
- **获取VPS列表**
|
||||
`https://www.heyunidc.cn/v1/hosts?page=1&limit=100`
|
||||
备注:GET方法,使用"Authorization: JWT {Token}"进行认证
|
||||
注意:若您的VPS数量超过100,需要更改limit数量
|
||||
|
||||
- **获取VPS状态**
|
||||
`https://www.heyunidc.cn/v1/hosts/{id}/module/status?type=host`
|
||||
备注:GET方法,使用"Authorization: JWT {Token}"进行认证
|
||||
|
||||
- **操作VPS**
|
||||
`PUT https://www.heyunidc.cn/v1/hosts/:id/module/hard_reboot`
|
||||
备注:PUT方法,使用"Authorization: JWT {Token}"进行认证
|
||||
操作类型:hard_reboot - 硬重启,on - 开机,off - 关机,reboot - 重启
|
||||
|
||||
### 使用方法
|
||||
|
||||
#### 获取API_KEY
|
||||
如图所示:
|
||||
|
||||

|
||||
|
||||
#### Web端
|
||||
部署到服务器上,分配域名或直接IP访问即可
|
||||
|
||||
首次使用会进入配置页,依次输入API_PASS,ACCOUNT,API_KEY(其中API_PASS是您自定义的网站访问密码,支持大小写字母以及数字)
|
||||
|
||||
随后访问`http://example.com/?pass=API_PASS`即可
|
||||
|
||||
#### 监控端
|
||||
- 安装:
|
||||
|
||||
**安装:**
|
||||
1. chmod +x ./install.sh
|
||||
2. ./install.sh
|
||||
|
||||
系统将自动注册名为idc-monitor的system服务
|
||||
|
||||
- 安装:
|
||||
**卸载:**
|
||||
1. chmod +x ./uninstall.sh
|
||||
2. ./uninstall.sh
|
||||
|
||||
### 配置信息
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user