🔨 优化一键脚本

This commit is contained in:
naiba 2021-01-31 19:14:30 +08:00
parent b5bb569bb3
commit a6b4b4759f
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# 哪吒面板 # 哪吒面板
![dashboard](https://img.shields.io/badge/管理面板-v0.4.4-brightgreen?style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=%E9%9D%A2%E6%9D%BF%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.4.2-brightgreen?style=for-the-badge&logo=linux) ![dashboard](https://img.shields.io/badge/管理面板-v0.4.4-brightgreen?style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=%E9%9D%A2%E6%9D%BF%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.4.3-brightgreen?style=for-the-badge&logo=linux)
系统状态监控报警、API(SSL证书变更、即将到期、到期)/TCP端口存活/PING 监控、计划任务(可以定时在Agent上执行命令备份、重启、What ever you want)、极省资源64M 服务器也能装 agent。 系统状态监控报警、API(SSL证书变更、即将到期、到期)/TCP端口存活/PING 监控、计划任务(可以定时在Agent上执行命令备份、重启、What ever you want)、极省资源64M 服务器也能装 agent。
@ -20,14 +20,14 @@
```shell ```shell
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
sudo ./nezha.sh ./nezha.sh
``` ```
- 国内加速:(有缓存可能不是最新的,非作者维护) - 国内加速:(有缓存可能不是最新的,非作者维护)
```shell ```shell
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
sudo ./nezha.sh CN=true ./nezha.sh
``` ```
## 功能说明 ## 功能说明

View File

@ -10,7 +10,7 @@ NZ_BASE_PATH="/opt/nezha"
NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard" NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent" NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service" NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
NZ_VERSION="v0.4.2" NZ_VERSION="v0.4.3"
GITHUB_RAW_URL="raw.githubusercontent.com" GITHUB_RAW_URL="raw.githubusercontent.com"
GITHUB_URL="github.com" GITHUB_URL="github.com"
@ -85,8 +85,7 @@ pre_check() {
os_arch="arm" os_arch="arm"
fi fi
## server location if [[ -z "${CN}" ]]; then
if curl -s api.myip.la/json | grep -q 'China'; then
GITHUB_RAW_URL="raw.sevencdn.com" GITHUB_RAW_URL="raw.sevencdn.com"
GITHUB_URL="hub.fastgit.org" GITHUB_URL="hub.fastgit.org"
fi fi