diff --git a/README.md b/README.md index 78a7c19..81ae823 100644 --- a/README.md +++ b/README.md @@ -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.1-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.2-brightgreen?style=for-the-badge&logo=linux) 系统状态监控报警、API(SSL证书变更、即将到期、到期)/TCP端口存活/PING 监控、计划任务(可以定时在Agent上执行命令,备份、重启、What ever you want)、极省资源,64M 服务器也能装 agent。 diff --git a/script/install.sh b/script/install.sh index 429cadc..c89e167 100755 --- a/script/install.sh +++ b/script/install.sh @@ -10,7 +10,7 @@ NZ_BASE_PATH="/opt/nezha" NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard" NZ_AGENT_PATH="${NZ_BASE_PATH}/agent" NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service" -NZ_VERSION="v4.0.1" +NZ_VERSION="v0.4.2" GITHUB_RAW_URL="raw.githubusercontent.com" GITHUB_URL="github.com" @@ -203,8 +203,8 @@ modify_agent_config() { echo "请先在管理面板上添加Agent,记录下密钥" && read -p "请输入一个解析到面板所在IP的域名(不可套CDN): " nz_grpc_host && read -p "请输入面板RPC端口: (5555)" nz_grpc_port && - read -p "请输入Agent 密钥: " nezha_client_secret - if [[ -z "${nz_grpc_host}" || -z "${nezha_client_secret}" ]]; then + read -p "请输入Agent 密钥: " nz_client_secret + if [[ -z "${nz_grpc_host}" || -z "${nz_client_secret}" ]]; then echo -e "${red}所有选项都不能为空${plain}" before_show_menu return 1 @@ -216,7 +216,7 @@ modify_agent_config() { sed -i "s/nz_grpc_host/${nz_grpc_host}/" ${NZ_AGENT_SERVICE} sed -i "s/nz_grpc_port/${nz_grpc_port}/" ${NZ_AGENT_SERVICE} - sed -i "s/nezha_client_secret/${nezha_client_secret}/" ${NZ_AGENT_SERVICE} + sed -i "s/nz_client_secret/${nz_client_secret}/" ${NZ_AGENT_SERVICE} echo -e "Agent配置 ${green}修改成功,请稍等重启生效${plain}" diff --git a/script/nezha-agent.service b/script/nezha-agent.service index 9fbbde9..34145e7 100644 --- a/script/nezha-agent.service +++ b/script/nezha-agent.service @@ -15,7 +15,7 @@ Type=simple User=root Group=root WorkingDirectory=/opt/nezha/agent/ -ExecStart=/opt/nezha/agent/nezha-agent -d -s nz_grpc_host:nz_grpc_port -p nezha_client_secret +ExecStart=/opt/nezha/agent/nezha-agent -d -s nz_grpc_host:nz_grpc_port -p nz_client_secret Restart=always #Environment=DEBUG=true