🔨 install script v4.0.1
This commit is contained in:
parent
7994c1d1a2
commit
f56332b235
@ -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.0-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.1-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。
|
||||||
|
|
||||||
|
@ -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="v4.0.0"
|
NZ_VERSION="v4.0.1"
|
||||||
GITHUB_RAW_URL="raw.githubusercontent.com"
|
GITHUB_RAW_URL="raw.githubusercontent.com"
|
||||||
GITHUB_URL="github.com"
|
GITHUB_URL="github.com"
|
||||||
|
|
||||||
@ -201,10 +201,10 @@ modify_agent_config() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "请先在管理面板上添加Agent,记录下密钥" &&
|
echo "请先在管理面板上添加Agent,记录下密钥" &&
|
||||||
read -p "请输入一个解析到面板所在IP的域名(不可套CDN): " nz_rpc_host &&
|
read -p "请输入一个解析到面板所在IP的域名(不可套CDN): " nz_grpc_host &&
|
||||||
read -p "请输入面板RPC端口: (5555)" nz_grpc_port &&
|
read -p "请输入面板RPC端口: (5555)" nz_grpc_port &&
|
||||||
read -p "请输入Agent 密钥: " nezha_client_secret
|
read -p "请输入Agent 密钥: " nezha_client_secret
|
||||||
if [[ -z "${nz_rpc_host}" || -z "${nezha_client_secret}" ]]; then
|
if [[ -z "${nz_grpc_host}" || -z "${nezha_client_secret}" ]]; then
|
||||||
echo -e "${red}所有选项都不能为空${plain}"
|
echo -e "${red}所有选项都不能为空${plain}"
|
||||||
before_show_menu
|
before_show_menu
|
||||||
return 1
|
return 1
|
||||||
@ -214,7 +214,7 @@ modify_agent_config() {
|
|||||||
nz_grpc_port=5555
|
nz_grpc_port=5555
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i "s/nz_rpc_host/${nz_rpc_host}/" ${NZ_AGENT_SERVICE}
|
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/nz_grpc_port/${nz_grpc_port}/" ${NZ_AGENT_SERVICE}
|
||||||
sed -i "s/nezha_client_secret/${nezha_client_secret}/" ${NZ_AGENT_SERVICE}
|
sed -i "s/nezha_client_secret/${nezha_client_secret}/" ${NZ_AGENT_SERVICE}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Type=simple
|
|||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
WorkingDirectory=/opt/nezha/agent/
|
WorkingDirectory=/opt/nezha/agent/
|
||||||
ExecStart=/opt/nezha/agent/nezha-agent -d -s nz_rpc_host:nz_grpc_port -p nezha_client_secret
|
ExecStart=/opt/nezha/agent/nezha-agent -d -s nz_grpc_host:nz_grpc_port -p nezha_client_secret
|
||||||
Restart=always
|
Restart=always
|
||||||
#Environment=DEBUG=true
|
#Environment=DEBUG=true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user