|
@@ -751,6 +751,8 @@ prompt_and_setup_ssl() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
config_after_update() {
|
|
config_after_update() {
|
|
|
|
|
+ local panel_needs_restart=0
|
|
|
|
|
+
|
|
|
echo -e "${yellow}x-ui settings:${plain}"
|
|
echo -e "${yellow}x-ui settings:${plain}"
|
|
|
${xui_folder}/x-ui setting -show true
|
|
${xui_folder}/x-ui setting -show true
|
|
|
${xui_folder}/x-ui migrate
|
|
${xui_folder}/x-ui migrate
|
|
@@ -798,6 +800,7 @@ config_after_update() {
|
|
|
local config_webBasePath=$(gen_random_string 18)
|
|
local config_webBasePath=$(gen_random_string 18)
|
|
|
${xui_folder}/x-ui setting -webBasePath "${config_webBasePath}"
|
|
${xui_folder}/x-ui setting -webBasePath "${config_webBasePath}"
|
|
|
existing_webBasePath="${config_webBasePath}"
|
|
existing_webBasePath="${config_webBasePath}"
|
|
|
|
|
+ panel_needs_restart=1
|
|
|
echo -e "${green}New WebBasePath: ${config_webBasePath}${plain}"
|
|
echo -e "${green}New WebBasePath: ${config_webBasePath}${plain}"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
@@ -832,6 +835,11 @@ config_after_update() {
|
|
|
echo -e "${green}Access URL: https://${cert_domain}:${existing_port}/${existing_webBasePath}${plain}"
|
|
echo -e "${green}Access URL: https://${cert_domain}:${existing_port}/${existing_webBasePath}${plain}"
|
|
|
echo -e "${green}═══════════════════════════════════════════${plain}"
|
|
echo -e "${green}═══════════════════════════════════════════${plain}"
|
|
|
fi
|
|
fi
|
|
|
|
|
+
|
|
|
|
|
+ if [[ "$panel_needs_restart" -eq 1 ]]; then
|
|
|
|
|
+ echo -e "${yellow}Restarting panel to apply the new web base path...${plain}"
|
|
|
|
|
+ systemctl restart x-ui 2> /dev/null || rc-service x-ui restart 2> /dev/null
|
|
|
|
|
+ fi
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
update_x-ui() {
|
|
update_x-ui() {
|