mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-07-01 12:32:09 +00:00
Code refactoring (#3011)
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
* Code refactoring read without -r will mangle backslashes https://github.com/koalaman/shellcheck/wiki/SC2162 * Update x-ui.sh
This commit is contained in:
parent
c988d55256
commit
c93467b852
1 changed files with 5 additions and 4 deletions
9
x-ui.sh
9
x-ui.sh
|
@ -69,7 +69,7 @@ confirm_restart() {
|
||||||
}
|
}
|
||||||
|
|
||||||
before_show_menu() {
|
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
|
show_menu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,8 +125,8 @@ update_menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
legacy_version() {
|
legacy_version() {
|
||||||
echo "Enter the panel version (like 2.4.0):"
|
echo -n "Enter the panel version (like 2.4.0):"
|
||||||
read tag_version
|
read -r tag_version
|
||||||
|
|
||||||
if [ -z "$tag_version" ]; then
|
if [ -z "$tag_version" ]; then
|
||||||
echo "Panel version cannot be empty. Exiting."
|
echo "Panel version cannot be empty. Exiting."
|
||||||
|
@ -256,7 +256,8 @@ check_config() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_port() {
|
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
|
if [[ -z "${port}" ]]; then
|
||||||
LOGD "Cancelled"
|
LOGD "Cancelled"
|
||||||
before_show_menu
|
before_show_menu
|
||||||
|
|
Loading…
Reference in a new issue