mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
improve bash menu
This commit is contained in:
parent
86586b7e8f
commit
b84e3ef338
@ -130,7 +130,7 @@ gen_random_string() {
|
|||||||
# This function will be called when user installed x-ui out of security
|
# This function will be called when user installed x-ui out of security
|
||||||
config_after_install() {
|
config_after_install() {
|
||||||
echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}"
|
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
|
if [[ "${config_confirm}" == "y" || "${config_confirm}" == "Y" ]]; then
|
||||||
read -p "Please set up your username: " config_account
|
read -p "Please set up your username: " config_account
|
||||||
echo -e "${yellow}Your username will be: ${config_account}${plain}"
|
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}Password: ${passwordTemp}${plain}"
|
||||||
echo -e "${green}WebBasePath: ${webBasePathTemp}${plain}"
|
echo -e "${green}WebBasePath: ${webBasePathTemp}${plain}"
|
||||||
echo -e "###############################################"
|
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
|
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
|
||||||
fi
|
fi
|
||||||
/usr/local/x-ui/x-ui migrate
|
/usr/local/x-ui/x-ui migrate
|
||||||
|
5
x-ui.sh
5
x-ui.sh
@ -262,10 +262,9 @@ reset_webbasepath() {
|
|||||||
echo -e "${yellow}Resetting Web Base Path${plain}"
|
echo -e "${yellow}Resetting Web Base Path${plain}"
|
||||||
|
|
||||||
# Prompt user to set a new web base path
|
# 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 [[ $config_webBasePath == "y" ]]; then
|
||||||
if [[ -z $config_webBasePath ]]; then
|
|
||||||
config_webBasePath=$(gen_random_string 10)
|
config_webBasePath=$(gen_random_string 10)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user