Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPk-web6936 <202365630+Pk-web6936@users.noreply.github.com>2025-05-16 21:23:57 +0300
committerGitHub <noreply@github.com>2025-05-16 21:23:57 +0300
commitc93467b85290a15b55c7fa3dde99e2c383a4829e (patch)
tree01b3b76ee9793b398bb6f8053a5c3bddfe2e636e /x-ui.sh
parentc988d55256d98d6133558dad3a7d96cad2339acf (diff)
Code refactoring (#3011)
* Code refactoring read without -r will mangle backslashes https://github.com/koalaman/shellcheck/wiki/SC2162 * Update x-ui.sh
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/x-ui.sh b/x-ui.sh
index a7cee914..88e5a7bb 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -69,7 +69,7 @@ confirm_restart() {
}
before_show_menu() {
- echo && echo -n -e "${yellow}Press enter to return to the main menu: ${plain}" && read temp
+ echo && echo -n -e "${yellow}Press enter to return to the main menu: ${plain}" && read -r temp
show_menu
}
@@ -125,8 +125,8 @@ update_menu() {
}
legacy_version() {
- echo "Enter the panel version (like 2.4.0):"
- read tag_version
+ echo -n "Enter the panel version (like 2.4.0):"
+ read -r tag_version
if [ -z "$tag_version" ]; then
echo "Panel version cannot be empty. Exiting."
@@ -256,7 +256,8 @@ check_config() {
}
set_port() {
- echo && echo -n -e "Enter port number[1-65535]: " && read port
+ echo -n "Enter port number[1-65535]: "
+ read -r port
if [[ -z "${port}" ]]; then
LOGD "Cancelled"
before_show_menu