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:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-07-02 01:34:25 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-07-02 01:34:25 +0300
commitb84e3ef33812e829078a8661da57f020438bcf6b (patch)
tree159f520b816d8875f60469a16434f4d417a9c368
parent86586b7e8fb3fb089bb43b1020b80e0eab1d4cb5 (diff)
improve bash menu
-rw-r--r--install.sh6
-rw-r--r--x-ui.sh5
2 files changed, 5 insertions, 6 deletions
diff --git a/install.sh b/install.sh
index c603878c..e6fe44e9 100644
--- a/install.sh
+++ b/install.sh
@@ -130,7 +130,7 @@ gen_random_string() {
# This function will be called when user installed x-ui out of security
config_after_install() {
echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}"
- read -p "Do you want to continue with the modification [y/n]?": config_confirm
+ read -p "Would you like to customize the panel settings? (If not, random settings will be applied) [y/n]: " config_confirm
if [[ "${config_confirm}" == "y" || "${config_confirm}" == "Y" ]]; then
read -p "Please set up your username: " config_account
echo -e "${yellow}Your username will be: ${config_account}${plain}"
@@ -160,9 +160,9 @@ config_after_install() {
echo -e "${green}Password: ${passwordTemp}${plain}"
echo -e "${green}WebBasePath: ${webBasePathTemp}${plain}"
echo -e "###############################################"
- echo -e "${red}If you forgot your login info, you can type x-ui and then type 8 to check after installation${plain}"
+ echo -e "${yellow}If you forgot your login info, you can type "x-ui settings" to check after installation${plain}"
else
- echo -e "${red}This is your upgrade, will keep old settings. If you forgot your login info, you can type x-ui and then type 8 to check${plain}"
+ echo -e "${yellow}This is your upgrade, will keep old settings. If you forgot your login info, you can type "x-ui settings" to check${plain}"
fi
fi
/usr/local/x-ui/x-ui migrate
diff --git a/x-ui.sh b/x-ui.sh
index 9e452b96..7bb8add3 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -262,10 +262,9 @@ reset_webbasepath() {
echo -e "${yellow}Resetting Web Base Path${plain}"
# Prompt user to set a new web base path
- read -rp "Please set the new web base path [default is a random path]: " config_webBasePath
+ read -rp "Please set the new web base path [press 'y' for a random path]: " config_webBasePath
- # If user input is empty, generate a random path
- if [[ -z $config_webBasePath ]]; then
+ if [[ $config_webBasePath == "y" ]]; then
config_webBasePath=$(gen_random_string 10)
fi