From c6c7dd51711faf9ea6eb093a42ccca4bdb4ff447 Mon Sep 17 00:00:00 2001 From: UUBulb <35923940+uubulb@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:58:02 +0800 Subject: [PATCH] add install_host & tls prompt for dashboard script (#26) --- extras/config.yaml | 2 + install.sh | 28 ++++- install_en.sh | 28 ++++- nezha/template.pot | 102 +++++++++-------- nezha/template.sh | 28 ++++- nezha/translations/en_US/LC_MESSAGES/nezha.mo | Bin 7353 -> 7651 bytes nezha/translations/en_US/LC_MESSAGES/nezha.po | 106 ++++++++++-------- nezha/translations/zh_CN/LC_MESSAGES/nezha.mo | Bin 6953 -> 7274 bytes nezha/translations/zh_CN/LC_MESSAGES/nezha.po | 104 +++++++++-------- 9 files changed, 240 insertions(+), 158 deletions(-) diff --git a/extras/config.yaml b/extras/config.yaml index cc25512..b3f0704 100644 --- a/extras/config.yaml +++ b/extras/config.yaml @@ -2,3 +2,5 @@ debug: false listenport: nz_port language: nz_language sitename: "nz_site_title" +installhost: nz_hostport +tls: nz_tls diff --git a/install.sh b/install.sh index 4fe77aa..7d5795a 100644 --- a/install.sh +++ b/install.sh @@ -330,15 +330,29 @@ modify_config() { return 0 fi - printf "请输入站点标题: " read -r nz_site_title printf "请输入暴露端口: (默认 8008)" read -r nz_port - info "请指定后台语言" - info "1. 中文(简体)" - info "2. 中文(台灣)" - info "3. English" + printf "请指定安装命令中预设的 nezha-agent 连接地址 (例如 example.com:443)" + read -r nz_hostport + printf "是否希望通过 TLS 连接 Agent?(影响安装命令)[y/N]" + read -r input + case $input in + [yY][eE][sS] | [yY]) + nz_tls=true + ;; + [nN][oO] | [nN]) + nz_tls=false + ;; + *) + nz_tls=false + ;; + esac + println "请指定后台语言" + println "1. 中文(简体)" + println "2. 中文(台灣)" + println "3. English" while true; do printf "请输入选项 [1-3]" read -r option @@ -361,7 +375,7 @@ modify_config() { esac done - if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ]; then + if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ] || [ -z "$nz_hostport" ]; then err ""所有选项都不能为空"" before_show_menu return 1 @@ -374,6 +388,8 @@ modify_config() { sed -i "s/nz_port/${nz_port}/" /tmp/nezha-config.yaml sed -i "s/nz_language/${nz_lang}/" /tmp/nezha-config.yaml sed -i "s/nz_site_title/${nz_site_title}/" /tmp/nezha-config.yaml + sed -i "s/nz_hostport/${nz_hostport}/" /tmp/nezha-config.yaml + sed -i "s/nz_tls/${nz_tls}/" /tmp/nezha-config.yaml if [ "$IS_DOCKER_NEZHA" = 1 ]; then sed -i "s/nz_port/${nz_port}/g" /tmp/nezha-docker-compose.yaml sed -i "s/nz_image_url/${Docker_IMG}/" /tmp/nezha-docker-compose.yaml diff --git a/install_en.sh b/install_en.sh index 5b17358..6947949 100644 --- a/install_en.sh +++ b/install_en.sh @@ -330,15 +330,29 @@ modify_config() { return 0 fi - printf "Please enter the site title: " read -r nz_site_title printf "Please enter the exposed port: (default 8008)" read -r nz_port - info "Please specify the backend locale" - info "1. 中文(简体)" - info "2. 中文(台灣)" - info "3. English" + printf "Please specify the preset nezha-agent host in install commands: (e.g. example.com:443)" + read -r nz_hostport + printf "Do you prefer to connect Agent via TLS? [y/N]" + read -r input + case $input in + [yY][eE][sS] | [yY]) + nz_tls=true + ;; + [nN][oO] | [nN]) + nz_tls=false + ;; + *) + nz_tls=false + ;; + esac + println "Please specify the backend locale" + println "1. 中文(简体)" + println "2. 中文(台灣)" + println "3. English" while true; do printf "Please enter [1-3]: " read -r option @@ -361,7 +375,7 @@ modify_config() { esac done - if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ]; then + if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ] || [ -z "$nz_hostport" ]; then err "All options cannot be empty" before_show_menu return 1 @@ -374,6 +388,8 @@ modify_config() { sed -i "s/nz_port/${nz_port}/" /tmp/nezha-config.yaml sed -i "s/nz_language/${nz_lang}/" /tmp/nezha-config.yaml sed -i "s/nz_site_title/${nz_site_title}/" /tmp/nezha-config.yaml + sed -i "s/nz_hostport/${nz_hostport}/" /tmp/nezha-config.yaml + sed -i "s/nz_tls/${nz_tls}/" /tmp/nezha-config.yaml if [ "$IS_DOCKER_NEZHA" = 1 ]; then sed -i "s/nz_port/${nz_port}/g" /tmp/nezha-docker-compose.yaml sed -i "s/nz_image_url/${Docker_IMG}/" /tmp/nezha-docker-compose.yaml diff --git a/nezha/template.pot b/nezha/template.pot index abc628d..ebfc277 100644 --- a/nezha/template.pot +++ b/nezha/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-29 21:03+0800\n" +"POT-Creation-Date: 2024-12-02 13:39+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -96,194 +96,204 @@ msgstr "" msgid "https://${GITHUB_RAW_URL}/install_en.sh" msgstr "" -#: nezha/template.sh:249 +#: nezha/template.sh:249 nezha/template.sh:266 msgid "Execute new script after 3s" msgstr "" -#: nezha/template.sh:257 +#: nezha/template.sh:274 msgid "* Press Enter to return to the main menu *" msgstr "" -#: nezha/template.sh:262 +#: nezha/template.sh:279 msgid "> Install" msgstr "" -#: nezha/template.sh:268 +#: nezha/template.sh:285 msgid "" "You may have already installed the dashboard, repeated installation will " "overwrite the data, please pay attention to backup." msgstr "" -#: nezha/template.sh:269 +#: nezha/template.sh:286 msgid "Exit the installation? [Y/n]" msgstr "" -#: nezha/template.sh:273 nezha/template.sh:281 +#: nezha/template.sh:290 nezha/template.sh:297 msgid "Exit the installation" msgstr "" -#: nezha/template.sh:277 +#: nezha/template.sh:294 msgid "Continue" msgstr "" -#: nezha/template.sh:295 +#: nezha/template.sh:311 msgid "Modify Configuration" msgstr "" -#: nezha/template.sh:299 +#: nezha/template.sh:315 msgid "Download Docker Script" msgstr "" -#: nezha/template.sh:302 nezha/template.sh:313 +#: nezha/template.sh:318 nezha/template.sh:329 msgid "" "Script failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "" -#: nezha/template.sh:306 +#: nezha/template.sh:322 msgid "" "Please install docker-compose manually. https://docs.docker.com/compose/" "install/linux/" msgstr "" -#: nezha/template.sh:318 +#: nezha/template.sh:334 msgid "Please enter the site title: " msgstr "" -#: nezha/template.sh:320 +#: nezha/template.sh:336 msgid "Please enter the exposed port: (default 8008)" msgstr "" -#: nezha/template.sh:322 +#: nezha/template.sh:338 +msgid "" +"Please specify the preset nezha-agent host in install commands: (e.g. " +"example.com:443)" +msgstr "" + +#: nezha/template.sh:340 +msgid "Do you prefer to connect Agent via TLS? [y/N]" +msgstr "" + +#: nezha/template.sh:355 msgid "Please specify the backend locale" msgstr "" -#: nezha/template.sh:327 +#: nezha/template.sh:360 msgid "Please enter [1-3]: " msgstr "" -#: nezha/template.sh:343 +#: nezha/template.sh:376 msgid "Please enter the correct number [1-3]" msgstr "" -#: nezha/template.sh:349 +#: nezha/template.sh:382 msgid "All options cannot be empty" msgstr "" -#: nezha/template.sh:373 +#: nezha/template.sh:408 msgid "Downloading service file" msgstr "" -#: nezha/template.sh:377 nezha/template.sh:383 +#: nezha/template.sh:412 nezha/template.sh:418 msgid "" "File failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "" -#: nezha/template.sh:391 +#: nezha/template.sh:426 msgid "" "Dashboard configuration modified successfully, please wait for Dashboard " "self-restart to take effect" msgstr "" -#: nezha/template.sh:401 +#: nezha/template.sh:436 msgid "> Restart and Update" msgstr "" -#: nezha/template.sh:410 +#: nezha/template.sh:445 msgid "Nezha Monitoring Restart Successful" msgstr "" -#: nezha/template.sh:411 +#: nezha/template.sh:446 msgid "Default address: domain:site_access_port" msgstr "" -#: nezha/template.sh:413 +#: nezha/template.sh:448 msgid "" "The restart failed, probably because the boot time exceeded two seconds, " "please check the log information later" msgstr "" -#: nezha/template.sh:440 +#: nezha/template.sh:475 msgid "" "Fail to obtain Dashboard version, please check if the network can link " "https://api.github.com/repos/nezhahq/nezha/releases/latest" msgstr "" -#: nezha/template.sh:443 +#: nezha/template.sh:478 msgid "The current latest version is: ${_version}" msgstr "" -#: nezha/template.sh:472 +#: nezha/template.sh:507 msgid "> View Log" msgstr "" -#: nezha/template.sh:498 +#: nezha/template.sh:533 msgid "> Uninstall" msgstr "" -#: nezha/template.sh:537 +#: nezha/template.sh:572 msgid "Nezha Monitor Management Script Usage: " msgstr "" -#: nezha/template.sh:539 +#: nezha/template.sh:574 msgid "./nezha.sh - Show Menu" msgstr "" -#: nezha/template.sh:540 +#: nezha/template.sh:575 msgid "./nezha.sh install - Install Dashboard" msgstr "" -#: nezha/template.sh:541 +#: nezha/template.sh:576 msgid "./nezha.sh modify_config - Modify Dashboard Configuration" msgstr "" -#: nezha/template.sh:542 +#: nezha/template.sh:577 msgid "./nezha.sh restart_and_update - Restart and Update the Dashboard" msgstr "" -#: nezha/template.sh:543 +#: nezha/template.sh:578 msgid "./nezha.sh show_log - View Dashboard Log" msgstr "" -#: nezha/template.sh:544 +#: nezha/template.sh:579 msgid "./nezha.sh uninstall - Uninstall Dashboard" msgstr "" -#: nezha/template.sh:549 +#: nezha/template.sh:584 msgid "${green}Nezha Monitor Management Script${plain}" msgstr "" -#: nezha/template.sh:551 +#: nezha/template.sh:586 msgid "${green}1.${plain} Install Dashboard" msgstr "" -#: nezha/template.sh:552 +#: nezha/template.sh:587 msgid "${green}2.${plain} Modify Dashboard Configuration" msgstr "" -#: nezha/template.sh:553 +#: nezha/template.sh:588 msgid "${green}3.${plain} Restart and Update Dashboard" msgstr "" -#: nezha/template.sh:554 +#: nezha/template.sh:589 msgid "${green}4.${plain} View Dashboard Log" msgstr "" -#: nezha/template.sh:555 +#: nezha/template.sh:590 msgid "${green}5.${plain} Uninstall Dashboard" msgstr "" -#: nezha/template.sh:557 +#: nezha/template.sh:592 msgid "${green}6.${plain} Update Script" msgstr "" -#: nezha/template.sh:559 +#: nezha/template.sh:594 msgid "${green}0.${plain} Exit Script" msgstr "" -#: nezha/template.sh:561 +#: nezha/template.sh:596 msgid "Please enter [0-6]: " msgstr "" -#: nezha/template.sh:585 +#: nezha/template.sh:620 msgid "Please enter the correct number [0-6]" msgstr "" diff --git a/nezha/template.sh b/nezha/template.sh index 815795c..7d1f42e 100644 --- a/nezha/template.sh +++ b/nezha/template.sh @@ -330,15 +330,29 @@ modify_config() { return 0 fi - printf _("Please enter the site title: ") read -r nz_site_title printf _("Please enter the exposed port: (default 8008)") read -r nz_port - info _("Please specify the backend locale") - info "1. 中文(简体)" - info "2. 中文(台灣)" - info "3. English" + printf _("Please specify the preset nezha-agent host in install commands: (e.g. example.com:443)") + read -r nz_hostport + printf _("Do you prefer to connect Agent via TLS? [y/N]") + read -r input + case $input in + [yY][eE][sS] | [yY]) + nz_tls=true + ;; + [nN][oO] | [nN]) + nz_tls=false + ;; + *) + nz_tls=false + ;; + esac + println _("Please specify the backend locale") + println "1. 中文(简体)" + println "2. 中文(台灣)" + println "3. English" while true; do printf _("Please enter [1-3]: ") read -r option @@ -361,7 +375,7 @@ modify_config() { esac done - if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ]; then + if [ -z "$nz_lang" ] || [ -z "$nz_site_title" ] || [ -z "$nz_hostport" ]; then err _("All options cannot be empty") before_show_menu return 1 @@ -374,6 +388,8 @@ modify_config() { sed -i "s/nz_port/${nz_port}/" /tmp/nezha-config.yaml sed -i "s/nz_language/${nz_lang}/" /tmp/nezha-config.yaml sed -i "s/nz_site_title/${nz_site_title}/" /tmp/nezha-config.yaml + sed -i "s/nz_hostport/${nz_hostport}/" /tmp/nezha-config.yaml + sed -i "s/nz_tls/${nz_tls}/" /tmp/nezha-config.yaml if [ "$IS_DOCKER_NEZHA" = 1 ]; then sed -i "s/nz_port/${nz_port}/g" /tmp/nezha-docker-compose.yaml sed -i "s/nz_image_url/${Docker_IMG}/" /tmp/nezha-docker-compose.yaml diff --git a/nezha/translations/en_US/LC_MESSAGES/nezha.mo b/nezha/translations/en_US/LC_MESSAGES/nezha.mo index 7af985ac02bc652360dbe46d86aeeb5ca5626420..9100583de6f5a27d9be7ce7aafc7f51ed42bb3ba 100644 GIT binary patch delta 1635 zcmc)K&2LOm7{~FaHKSTZb+l-`TrYi7)7DI@S}&dIPOFGUi&zYJN-(xeh%QB7>@L{i_M85{qAlX>QI?wNbfJ?A-3=0)9?&GE@x z&rPFkCzcWG)6Mqd77t&v2VS#M9Kx0O4vX*`1~6x~Srs;6F~+b2@8BwYjg|Nn*I{0U zSs8|KgIU~;)7i$rT@2v_YT{*c%!0TJ=iw#H#Ot^S@8Dc~iVN^1X5knfzzT0>G&C#!D{p~OFkaPB{+c1cmp-zBAs_kIipCiz!(T{ISTXrgO>|%gZ=ojsh(Vl7{@J`WAg5+K zk)Ny`$-4C*d$NAyldCaK_O{@BdAQiN7clSIGqrk#k^HFbfoM}c@b3;w@@jb zNm*2oylzG<^c1Ql?&Cgug-Z1zR;TNY$m!WtR88DN2lq_V(Gg^`>?qcvcJPQVj?dnp zYT^U7;S>(yHr}S4jA9zDAoQ29F;V7OnW>!VKNv@wT2`%3%3wDQq>W4 zZ)*uPYStQwdO}CZzRgQ$Q+n^ettc_>@$Fxq8deeMJXAD)n|7(Ht07dKI`48qg`{F| z2sKqKe^!4AP}eH3P-3gMaFr5WL98Y=5!;CjVl%-x+ScI#Z7PM&s;xu>02 z)HxE3MBF1Wr?JzG#GJF;VW+KSZ-aAiptAMQ@MLDIC(&5oYvTSsH|9j#b6sJ7_|L6f z(Y~0|9pTd#3-|OeQEzWJav5L S>w|T}pK|KF|8q6%>AwNu(A9$g delta 1371 zcmZA1Pe{{Y9LMpmwq>rg{9CrlndRT<+@{quZGr^4=n!Hkbf{%^N`weOV=W4z2#g_= zNS7}CF#>nU=nzICM3)dc1SPdo9ijrEz(enko0lH;{9ey~zwO!ce4h_XwY><%J{LMB zjTWZwQqMN)mkutpD^9Z-jAJ=I#{Kvf1Nal0uyUhW74~8^j$s8pKp!q(9j;(4dUDMC zW-;qw(7}yy4C71G#H$!Y-zKv>jAAa1U@?y2W}LvSIE^lx!2x`ZZY<2j6Hao)o5WeSdH^oiQh1cd0W!Y zk7tZZe&0qJ4B>55X;(73*|y$yVgnB0Zk)tEOrlEc$~W7FUOa~F=)s#JMrB|CtMC@;`?IJ8 zencOxq88*WN@w6?5%nho7UzaCki;<%D))L z((UOC+(mxVQm6|2L1nOMjYod2NHl2gQv)*bMG}3jBN}E=%tt&V>d?i;+W#v!E4(km~f$B({a=I(Lj8tS5 x^Z-3f&!LCtoQt(3?>Wyql0H|&k$j*3DBI<42!uQVe``}Pd95JiTz}G+{SUybgDn66 diff --git a/nezha/translations/en_US/LC_MESSAGES/nezha.po b/nezha/translations/en_US/LC_MESSAGES/nezha.po index eae0152..8640f0d 100644 --- a/nezha/translations/en_US/LC_MESSAGES/nezha.po +++ b/nezha/translations/en_US/LC_MESSAGES/nezha.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-29 21:03+0800\n" -"PO-Revision-Date: 2024-11-29 21:03+0800\n" +"POT-Creation-Date: 2024-12-02 13:39+0800\n" +"PO-Revision-Date: 2024-12-02 13:39+0800\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en_US\n" @@ -103,19 +103,19 @@ msgstr "> Update Script" msgid "https://${GITHUB_RAW_URL}/install_en.sh" msgstr "https://${GITHUB_RAW_URL}/install_en.sh" -#: nezha/template.sh:249 +#: nezha/template.sh:249 nezha/template.sh:266 msgid "Execute new script after 3s" msgstr "Execute new script after 3s" -#: nezha/template.sh:257 +#: nezha/template.sh:274 msgid "* Press Enter to return to the main menu *" msgstr "* Press Enter to return to the main menu *" -#: nezha/template.sh:262 +#: nezha/template.sh:279 msgid "> Install" msgstr "> Install" -#: nezha/template.sh:268 +#: nezha/template.sh:285 msgid "" "You may have already installed the dashboard, repeated installation will " "overwrite the data, please pay attention to backup." @@ -123,33 +123,33 @@ msgstr "" "You may have already installed the dashboard, repeated installation will " "overwrite the data, please pay attention to backup." -#: nezha/template.sh:269 +#: nezha/template.sh:286 msgid "Exit the installation? [Y/n]" msgstr "Exit the installation? [Y/n]" -#: nezha/template.sh:273 nezha/template.sh:281 +#: nezha/template.sh:290 nezha/template.sh:297 msgid "Exit the installation" msgstr "Exit the installation" -#: nezha/template.sh:277 +#: nezha/template.sh:294 msgid "Continue" msgstr "Continue" -#: nezha/template.sh:295 +#: nezha/template.sh:311 msgid "Modify Configuration" msgstr "Modify Configuration" -#: nezha/template.sh:299 +#: nezha/template.sh:315 msgid "Download Docker Script" msgstr "Download Docker Script" -#: nezha/template.sh:302 nezha/template.sh:313 +#: nezha/template.sh:318 nezha/template.sh:329 msgid "" "Script failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "" "Script failed to get, please check if the network can link ${GITHUB_RAW_URL}" -#: nezha/template.sh:306 +#: nezha/template.sh:322 msgid "" "Please install docker-compose manually. https://docs.docker.com/compose/" "install/linux/" @@ -157,41 +157,53 @@ msgstr "" "Please install docker-compose manually. https://docs.docker.com/compose/" "install/linux/" -#: nezha/template.sh:318 +#: nezha/template.sh:334 msgid "Please enter the site title: " msgstr "Please enter the site title: " -#: nezha/template.sh:320 +#: nezha/template.sh:336 msgid "Please enter the exposed port: (default 8008)" msgstr "Please enter the exposed port: (default 8008)" -#: nezha/template.sh:322 +#: nezha/template.sh:338 +msgid "" +"Please specify the preset nezha-agent host in install commands: (e.g. " +"example.com:443)" +msgstr "" +"Please specify the preset nezha-agent host in install commands: (e.g. " +"example.com:443)" + +#: nezha/template.sh:340 +msgid "Do you prefer to connect Agent via TLS? [y/N]" +msgstr "Do you prefer to connect Agent via TLS? [y/N]" + +#: nezha/template.sh:355 msgid "Please specify the backend locale" msgstr "Please specify the backend locale" -#: nezha/template.sh:327 +#: nezha/template.sh:360 msgid "Please enter [1-3]: " msgstr "Please enter [1-3]: " -#: nezha/template.sh:343 +#: nezha/template.sh:376 msgid "Please enter the correct number [1-3]" msgstr "Please enter the correct number [1-3]" -#: nezha/template.sh:349 +#: nezha/template.sh:382 msgid "All options cannot be empty" msgstr "All options cannot be empty" -#: nezha/template.sh:373 +#: nezha/template.sh:408 msgid "Downloading service file" msgstr "Downloading service file" -#: nezha/template.sh:377 nezha/template.sh:383 +#: nezha/template.sh:412 nezha/template.sh:418 msgid "" "File failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "" "File failed to get, please check if the network can link ${GITHUB_RAW_URL}" -#: nezha/template.sh:391 +#: nezha/template.sh:426 msgid "" "Dashboard configuration modified successfully, please wait for Dashboard " "self-restart to take effect" @@ -199,19 +211,19 @@ msgstr "" "Dashboard configuration modified successfully, please wait for Dashboard " "self-restart to take effect" -#: nezha/template.sh:401 +#: nezha/template.sh:436 msgid "> Restart and Update" msgstr "> Restart and Update" -#: nezha/template.sh:410 +#: nezha/template.sh:445 msgid "Nezha Monitoring Restart Successful" msgstr "Nezha Monitoring Restart Successful" -#: nezha/template.sh:411 +#: nezha/template.sh:446 msgid "Default address: domain:site_access_port" msgstr "Default address: domain:site_access_port" -#: nezha/template.sh:413 +#: nezha/template.sh:448 msgid "" "The restart failed, probably because the boot time exceeded two seconds, " "please check the log information later" @@ -219,7 +231,7 @@ msgstr "" "The restart failed, probably because the boot time exceeded two seconds, " "please check the log information later" -#: nezha/template.sh:440 +#: nezha/template.sh:475 msgid "" "Fail to obtain Dashboard version, please check if the network can link " "https://api.github.com/repos/nezhahq/nezha/releases/latest" @@ -227,82 +239,82 @@ msgstr "" "Fail to obtain Dashboard version, please check if the network can link " "https://api.github.com/repos/nezhahq/nezha/releases/latest" -#: nezha/template.sh:443 +#: nezha/template.sh:478 msgid "The current latest version is: ${_version}" msgstr "The current latest version is: ${_version}" -#: nezha/template.sh:472 +#: nezha/template.sh:507 msgid "> View Log" msgstr "> View Log" -#: nezha/template.sh:498 +#: nezha/template.sh:533 msgid "> Uninstall" msgstr "> Uninstall" -#: nezha/template.sh:537 +#: nezha/template.sh:572 msgid "Nezha Monitor Management Script Usage: " msgstr "Nezha Monitor Management Script Usage: " -#: nezha/template.sh:539 +#: nezha/template.sh:574 msgid "./nezha.sh - Show Menu" msgstr "./nezha.sh - Show Menu" -#: nezha/template.sh:540 +#: nezha/template.sh:575 msgid "./nezha.sh install - Install Dashboard" msgstr "./nezha.sh install - Install Dashboard" -#: nezha/template.sh:541 +#: nezha/template.sh:576 msgid "./nezha.sh modify_config - Modify Dashboard Configuration" msgstr "./nezha.sh modify_config - Modify Dashboard Configuration" -#: nezha/template.sh:542 +#: nezha/template.sh:577 msgid "./nezha.sh restart_and_update - Restart and Update the Dashboard" msgstr "./nezha.sh restart_and_update - Restart and Update the Dashboard" -#: nezha/template.sh:543 +#: nezha/template.sh:578 msgid "./nezha.sh show_log - View Dashboard Log" msgstr "./nezha.sh show_log - View Dashboard Log" -#: nezha/template.sh:544 +#: nezha/template.sh:579 msgid "./nezha.sh uninstall - Uninstall Dashboard" msgstr "./nezha.sh uninstall - Uninstall Dashboard" -#: nezha/template.sh:549 +#: nezha/template.sh:584 msgid "${green}Nezha Monitor Management Script${plain}" msgstr "${green}Nezha Monitor Management Script${plain}" -#: nezha/template.sh:551 +#: nezha/template.sh:586 msgid "${green}1.${plain} Install Dashboard" msgstr "${green}1.${plain} Install Dashboard" -#: nezha/template.sh:552 +#: nezha/template.sh:587 msgid "${green}2.${plain} Modify Dashboard Configuration" msgstr "${green}2.${plain} Modify Dashboard Configuration" -#: nezha/template.sh:553 +#: nezha/template.sh:588 msgid "${green}3.${plain} Restart and Update Dashboard" msgstr "${green}3.${plain} Restart and Update Dashboard" -#: nezha/template.sh:554 +#: nezha/template.sh:589 msgid "${green}4.${plain} View Dashboard Log" msgstr "${green}4.${plain} View Dashboard Log" -#: nezha/template.sh:555 +#: nezha/template.sh:590 msgid "${green}5.${plain} Uninstall Dashboard" msgstr "${green}5.${plain} Uninstall Dashboard" -#: nezha/template.sh:557 +#: nezha/template.sh:592 msgid "${green}6.${plain} Update Script" msgstr "${green}6.${plain} Update Script" -#: nezha/template.sh:559 +#: nezha/template.sh:594 msgid "${green}0.${plain} Exit Script" msgstr "${green}0.${plain} Exit Script" -#: nezha/template.sh:561 +#: nezha/template.sh:596 msgid "Please enter [0-6]: " msgstr "Please enter [0-6]: " -#: nezha/template.sh:585 +#: nezha/template.sh:620 msgid "Please enter the correct number [0-6]" msgstr "Please enter the correct number [0-6]" diff --git a/nezha/translations/zh_CN/LC_MESSAGES/nezha.mo b/nezha/translations/zh_CN/LC_MESSAGES/nezha.mo index 412250e91a8e69d0426a2aad50de6ac268801794..53637adbbc20d51934523697810145a4076f0e2e 100644 GIT binary patch delta 1689 zcmZA1ZA?>F7{Kv^UO=2vW(B9XaoDDSSYAp|R^O^bO*VpOETjJO-%NI$Oq*jVj|lI6D3RZ|IoW+^Q2FI=bYYi z?sLyMy+5p+sB9mZZ+xXF8;K>viWy4n#5D$Al(VTy72wyHi`Q@|PM`}j)08U3DqMyU z%*S5L!(XrjEnJRS=}Hx%7t54tSMO6q}_q~j^N(a9{?xCdXxD87v+P$nF~ESy4F zu}rc!j81$D2T&56!hD=JN2%9w6?$B(E<**@9{Z>n{l$q{D?Lumpdz+mEn{li2Y?PJTiY&5f&SL$&RNCl}j4mS|HOf~N zPT?wC$AMUktte-r8#m(x zsukr1U3^I*=Wz!P;j5U#P{wWh!>&9; zxzNE8mkakJ+olfN?Jsc??F;C`zfdOF#QvqABxMjQV}(X;hMSt4fHz~?j2u(WhAg{m zk(BjG)J$AMloPpxtf0&(MOJGA;UQ$Jc^<_pXZoEYEBJg_8oOyYcCN6y%TS&|4$Z$s zj=mhO3Zj&d{VpQ-7fl}`jZ)+UrxEf}lEQ02d1Gr+bMoZRS4_M{R1&hY>BMS+{ZVV< z(bRxZq@$sOy5)em&pePM%CEK0qcu%)}_v|zTW$Xdd9CF zlXUd>)zf2L-zRgNOq`iad}0kE&3nlEuxF({my;!-hKC-d!Jv!^UbkO zPGeSR5n_u*ipZd9aG+hWi&WzTx^V%w<4X+T53I-XG?7Y-Vik^I8Q#GFuAmp!um(Np zB0-Uu^pJFLVjLs*1a;s)*noiykt`g>OdQ309K#JbgPU*;9hkr&e1tA^aucce@g%lj zHO^r%&zBXFMoz3^A?7nm5!PZacA*Y5g9VsCt<+PTz*X$QUCRLSObJ{49^~a@!14r!>5rmT zYyl~%yub*)L!D4z0rl54?c~sc2eAaFQTM=o?8ar}9?4*X=s=}dj9$EqUAP;UP$y#B zoUC9D>UCjk!vn~lOmooj@5V?NTbA$$zQwKR<5#uM@+?-+pF%E?MeN7tsP`A~6xEM= zunYD2Ny~?LnEo5o>%6=rt02J$iJln1y?6$rxQIG{!Pd87r{+Xce4pXYY#`GDN_^CC zo!UmCW!5Fp)}BOCv5nBR)|b)B>AumXRnitFbZMEF@ULWjzvv$Nzg5J48hL}Y*6DiG zSqJ~QOn0E4Xe4w~=?>QI&sVa(Y22tyKdCfgr*>$3_R 更新脚本" msgid "https://${GITHUB_RAW_URL}/install_en.sh" msgstr "https://${GITHUB_RAW_URL}/install.sh" -#: nezha/template.sh:249 +#: nezha/template.sh:249 nezha/template.sh:266 msgid "Execute new script after 3s" msgstr "3s后执行新脚本" -#: nezha/template.sh:257 +#: nezha/template.sh:274 msgid "* Press Enter to return to the main menu *" msgstr "* 按回车返回主菜单 *" -#: nezha/template.sh:262 +#: nezha/template.sh:279 msgid "> Install" msgstr "> 安装" -#: nezha/template.sh:268 +#: nezha/template.sh:285 msgid "" "You may have already installed the dashboard, repeated installation will " "overwrite the data, please pay attention to backup." msgstr "您可能已经安装过面板端,重复安装会覆盖数据,请注意备份。" -#: nezha/template.sh:269 +#: nezha/template.sh:286 msgid "Exit the installation? [Y/n]" msgstr "是否退出安装? [Y/n]" -#: nezha/template.sh:273 nezha/template.sh:281 +#: nezha/template.sh:290 nezha/template.sh:297 msgid "Exit the installation" msgstr "退出安装" -#: nezha/template.sh:277 +#: nezha/template.sh:294 msgid "Continue" msgstr "继续安装" -#: nezha/template.sh:295 +#: nezha/template.sh:311 msgid "Modify Configuration" msgstr "> 修改配置" -#: nezha/template.sh:299 +#: nezha/template.sh:315 msgid "Download Docker Script" msgstr "正在下载 Docker 脚本" -#: nezha/template.sh:302 nezha/template.sh:313 +#: nezha/template.sh:318 nezha/template.sh:329 msgid "" "Script failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "脚本获取失败,请检查本机能否链接 ${GITHUB_RAW_URL}" -#: nezha/template.sh:306 +#: nezha/template.sh:322 msgid "" "Please install docker-compose manually. https://docs.docker.com/compose/" "install/linux/" msgstr "" "请手动安装 docker-compose。 https://docs.docker.com/compose/install/linux/" -#: nezha/template.sh:318 +#: nezha/template.sh:334 msgid "Please enter the site title: " msgstr "请输入站点标题: " -#: nezha/template.sh:320 +#: nezha/template.sh:336 msgid "Please enter the exposed port: (default 8008)" msgstr "请输入暴露端口: (默认 8008)" -#: nezha/template.sh:322 +#: nezha/template.sh:338 +msgid "" +"Please specify the preset nezha-agent host in install commands: (e.g. " +"example.com:443)" +msgstr "请指定安装命令中预设的 nezha-agent 连接地址 (例如 example.com:443)" + +#: nezha/template.sh:340 +msgid "Do you prefer to connect Agent via TLS? [y/N]" +msgstr "是否希望通过 TLS 连接 Agent?(影响安装命令)[y/N]" + +#: nezha/template.sh:355 msgid "Please specify the backend locale" msgstr "请指定后台语言" -#: nezha/template.sh:327 +#: nezha/template.sh:360 msgid "Please enter [1-3]: " msgstr "请输入选项 [1-3]" -#: nezha/template.sh:343 +#: nezha/template.sh:376 msgid "Please enter the correct number [1-3]" msgstr "请输入正确的选项 [1-3]" -#: nezha/template.sh:349 +#: nezha/template.sh:382 msgid "All options cannot be empty" msgstr "\"所有选项都不能为空\"" -#: nezha/template.sh:373 +#: nezha/template.sh:408 msgid "Downloading service file" msgstr "正在下载服务文件" -#: nezha/template.sh:377 nezha/template.sh:383 +#: nezha/template.sh:412 nezha/template.sh:418 msgid "" "File failed to get, please check if the network can link ${GITHUB_RAW_URL}" msgstr "文件下载失败,请检查本机能否连接 ${GITHUB_RAW_URL}" -#: nezha/template.sh:391 +#: nezha/template.sh:426 msgid "" "Dashboard configuration modified successfully, please wait for Dashboard " "self-restart to take effect" msgstr "Dashboard 配置 修改成功,请稍等 Dashboard 重启生效" -#: nezha/template.sh:401 +#: nezha/template.sh:436 msgid "> Restart and Update" msgstr "> 重启并更新" -#: nezha/template.sh:410 +#: nezha/template.sh:445 msgid "Nezha Monitoring Restart Successful" msgstr "哪吒监控 重启成功" -#: nezha/template.sh:411 +#: nezha/template.sh:446 msgid "Default address: domain:site_access_port" msgstr "默认地址:域名:站点访问端口" -#: nezha/template.sh:413 +#: nezha/template.sh:448 msgid "" "The restart failed, probably because the boot time exceeded two seconds, " "please check the log information later" msgstr "重启失败,可能是因为启动时间超过了两秒,请稍后查看日志信息" -#: nezha/template.sh:440 +#: nezha/template.sh:475 msgid "" "Fail to obtain Dashboard version, please check if the network can link " "https://api.github.com/repos/nezhahq/nezha/releases/latest" @@ -213,83 +223,83 @@ msgstr "" "获取 Dashboard 版本号失败,请检查本机能否链接 https://api.github.com/repos/" "nezhahq/nezha/releases/latest" -#: nezha/template.sh:443 +#: nezha/template.sh:478 msgid "The current latest version is: ${_version}" msgstr "当前最新版本为: ${_version}" -#: nezha/template.sh:472 +#: nezha/template.sh:507 msgid "> View Log" msgstr "> 获取日志" -#: nezha/template.sh:498 +#: nezha/template.sh:533 msgid "> Uninstall" msgstr "> 卸载" -#: nezha/template.sh:537 +#: nezha/template.sh:572 msgid "Nezha Monitor Management Script Usage: " msgstr "哪吒监控 管理脚本使用方法: " -#: nezha/template.sh:539 +#: nezha/template.sh:574 msgid "./nezha.sh - Show Menu" msgstr "./nezha.sh - 显示管理菜单" -#: nezha/template.sh:540 +#: nezha/template.sh:575 msgid "./nezha.sh install - Install Dashboard" msgstr "./nezha.sh install - 安装面板端" -#: nezha/template.sh:541 +#: nezha/template.sh:576 msgid "./nezha.sh modify_config - Modify Dashboard Configuration" msgstr "./nezha.sh modify_config - 修改面板配置" -#: nezha/template.sh:542 +#: nezha/template.sh:577 msgid "./nezha.sh restart_and_update - Restart and Update the Dashboard" msgstr "./nezha.sh restart_and_update - 重启并更新面板" -#: nezha/template.sh:543 +#: nezha/template.sh:578 msgid "./nezha.sh show_log - View Dashboard Log" msgstr "./nezha.sh show_log - 查看面板日志" -#: nezha/template.sh:544 +#: nezha/template.sh:579 msgid "./nezha.sh uninstall - Uninstall Dashboard" msgstr "./nezha.sh uninstall - 卸载管理面板" -#: nezha/template.sh:549 +#: nezha/template.sh:584 msgid "${green}Nezha Monitor Management Script${plain}" msgstr "${green}哪吒监控管理脚本${plain}" -#: nezha/template.sh:551 +#: nezha/template.sh:586 msgid "${green}1.${plain} Install Dashboard" msgstr "${green}1.${plain} 安装面板端" -#: nezha/template.sh:552 +#: nezha/template.sh:587 msgid "${green}2.${plain} Modify Dashboard Configuration" msgstr "${green}2.${plain} 修改面板配置" -#: nezha/template.sh:553 +#: nezha/template.sh:588 msgid "${green}3.${plain} Restart and Update Dashboard" msgstr "${green}3.${plain} 重启并更新面板" -#: nezha/template.sh:554 +#: nezha/template.sh:589 msgid "${green}4.${plain} View Dashboard Log" msgstr "${green}4.${plain} 查看面板日志" -#: nezha/template.sh:555 +#: nezha/template.sh:590 msgid "${green}5.${plain} Uninstall Dashboard" msgstr "${green}5.${plain} 卸载管理面板" -#: nezha/template.sh:557 +#: nezha/template.sh:592 msgid "${green}6.${plain} Update Script" msgstr "${green}6.${plain} 更新脚本" -#: nezha/template.sh:559 +#: nezha/template.sh:594 msgid "${green}0.${plain} Exit Script" msgstr "${green}0.${plain} 退出脚本" -#: nezha/template.sh:561 +#: nezha/template.sh:596 msgid "Please enter [0-6]: " msgstr "请输入选择 [0-6]: " -#: nezha/template.sh:585 +#: nezha/template.sh:620 msgid "Please enter the correct number [0-6]" msgstr "请输入正确的数字 [0-6]"