mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
if webBasePath lt 3 will be replace with new random
This commit is contained in:
parent
decac2ef74
commit
f0dd6152fd
@ -184,10 +184,13 @@ config_after_install() {
|
|||||||
else
|
else
|
||||||
echo -e "${yellow}This is your upgrade, keeping old settings. If you forgot your login info, you can type 'x-ui settings' to check${plain}"
|
echo -e "${yellow}This is your upgrade, keeping old settings. If you forgot your login info, you can type 'x-ui settings' to check${plain}"
|
||||||
|
|
||||||
local existing_webBasePath=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'webBasePath: [^ ]+' | awk '{print $2}')
|
local existing_webBasePath=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'webBasePath: .+' | awk '{print $2}')
|
||||||
if [[ -z "$existing_webBasePath" ]]; then
|
|
||||||
echo -e "${yellow}WebBasePath is empty, generating a random one: ${config_webBasePath}${plain}"
|
if [[ ${#existing_webBasePath} -lt 3 ]]; then
|
||||||
|
echo -e "${yellow}WebBasePath is empty, generating a random one...${plain}"
|
||||||
|
|
||||||
/usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}"
|
/usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}"
|
||||||
|
echo -e "${green}New webBasePath: ${config_webBasePath}${plain}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user