From 0f86f7ba742f45982945269751c3b11f67f20f06 Mon Sep 17 00:00:00 2001 From: CoiaPrant <42506847+CoiaPrant@users.noreply.github.com> Date: Mon, 2 Aug 2021 13:28:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=B6=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/install.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/script/install.sh b/script/install.sh index c95fe6c..a3c2196 100755 --- a/script/install.sh +++ b/script/install.sh @@ -45,7 +45,7 @@ pre_check() { ## China_IP if [[ $(curl -m 10 -s https://api.ip.sb/geoip | grep 'China') != "" ]]; then echo "根据ip.sb提供的信息,当前IP可能在中国" - read -r -p "是否选用中国镜像完成安装? [Y/n] " input + read -e -r -p "是否选用中国镜像完成安装? [Y/n] " input case $input in [yY][eE][sS] | [yY]) echo "使用中国镜像" @@ -79,12 +79,12 @@ pre_check() { confirm() { if [[ $# > 1 ]]; then - echo && read -p "$1 [默认$2]: " temp + echo && read -e -p "$1 [默认$2]: " temp if [[ x"${temp}" == x"" ]]; then temp=$2 fi else - read -p "$1 [y/n]: " temp + read -e -p "$1 [y/n]: " temp fi if [[ x"${temp}" == x"y" || x"${temp}" == x"Y" ]]; then return 0 @@ -220,9 +220,9 @@ modify_agent_config() { fi echo "请先在管理面板上添加Agent,记录下密钥" && - read -p "请输入一个解析到面板所在IP的域名(不可套CDN): " nz_grpc_host && - read -p "请输入面板RPC端口: (5555)" nz_grpc_port && - read -p "请输入Agent 密钥: " nz_client_secret + read -ep "请输入一个解析到面板所在IP的域名(不可套CDN): " nz_grpc_host && + read -ep "请输入面板RPC端口: (5555)" nz_grpc_port && + read -ep "请输入Agent 密钥: " nz_client_secret if [[ -z "${nz_grpc_host}" || -z "${nz_client_secret}" ]]; then echo -e "${red}所有选项都不能为空${plain}" before_show_menu @@ -268,13 +268,13 @@ modify_dashboard_config() { echo "关于 GitHub Oauth2 应用:在 https://github.com/settings/developers 创建,无需审核,Callback 填 http(s)://域名或IP/oauth2/callback" && echo "关于 Gitee Oauth2 应用:在 https://gitee.com/oauth/applications 创建,无需审核,Callback 填 http(s)://域名或IP/oauth2/callback" && - read -p "请输入 OAuth2 提供商(gitee/github,默认 github): " nz_oauth2_type && - read -p "请输入 Oauth2 应用的 Client ID: " nz_github_oauth_client_id && - read -p "请输入 Oauth2 应用的 Client Secret: " nz_github_oauth_client_secret && - read -p "请输入 GitHub/Gitee 登录名作为管理员,多个以逗号隔开: " nz_admin_logins && - read -p "请输入站点标题: " nz_site_title && - read -p "请输入站点访问端口: (8008)" nz_site_port && - read -p "请输入用于 Agent 接入的 RPC 端口: (5555)" nz_grpc_port + read -ep "请输入 OAuth2 提供商(gitee/github,默认 github): " nz_oauth2_type && + read -ep "请输入 Oauth2 应用的 Client ID: " nz_github_oauth_client_id && + read -ep "请输入 Oauth2 应用的 Client Secret: " nz_github_oauth_client_secret && + read -ep "请输入 GitHub/Gitee 登录名作为管理员,多个以逗号隔开: " nz_admin_logins && + read -ep "请输入站点标题: " nz_site_title && + read -ep "请输入站点访问端口: (8008)" nz_site_port && + read -ep "请输入用于 Agent 接入的 RPC 端口: (5555)" nz_grpc_port if [[ -z "${nz_admin_logins}" || -z "${nz_github_oauth_client_id}" || -z "${nz_github_oauth_client_secret}" || -z "${nz_site_title}" ]]; then echo -e "${red}所有选项都不能为空${plain}" @@ -467,7 +467,7 @@ show_menu() { ————————————————- ${green}0.${plain} 退出脚本 " - echo && read -p "请输入选择 [0-13]: " num + echo && read -ep "请输入选择 [0-13]: " num case "${num}" in 0) From 33b151072455593522700573246dd96e979b7a3f Mon Sep 17 00:00:00 2001 From: CoiaPrant <42506847+CoiaPrant@users.noreply.github.com> Date: Tue, 3 Aug 2021 19:51:15 +0800 Subject: [PATCH 2/3] Update install.sh --- script/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/install.sh b/script/install.sh index a3c2196..993859a 100755 --- a/script/install.sh +++ b/script/install.sh @@ -11,7 +11,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="v0.6.4" +NZ_VERSION="v0.6.5" red='\033[0;31m' green='\033[0;32m' From c35103a2b6919d2c10679b6b4060a7864fe8ee67 Mon Sep 17 00:00:00 2001 From: CoiaPrant <42506847+CoiaPrant@users.noreply.github.com> Date: Tue, 3 Aug 2021 19:54:53 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69bca82..8b4d4a5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。