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:
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/x-ui.sh b/x-ui.sh
index e4bc622b..545b1af5 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -265,12 +265,13 @@ gen_random_string() {
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 [press 'y' for a random path]: " config_webBasePath
-
- if [[ $config_webBasePath == "y" ]]; then
- config_webBasePath=$(gen_random_string 10)
+ read -rp "Are you sure you want to reset the web base path? (y/n): " confirm
+ if [[ $confirm != "y" && $confirm != "Y" ]]; then
+ echo -e "${yellow}Operation canceled.${plain}"
+ return
fi
+
+ config_webBasePath=$(gen_random_string 10)
# Apply the new web base path setting
/usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}" >/dev/null 2>&1