mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 06:46:17 +00:00
Update x-ui.sh
This commit is contained in:
parent
eb7b1e7998
commit
af4b94ab0a
1 changed files with 7 additions and 7 deletions
14
x-ui.sh
14
x-ui.sh
|
@ -127,7 +127,7 @@ uninstall() {
|
|||
systemctl daemon-reload
|
||||
systemctl reset-failed
|
||||
rm /etc/x-ui/ -rf
|
||||
rm /usr/local/3x-ui-p1/ -rf
|
||||
rm /usr/local/x-ui/ -rf
|
||||
|
||||
echo ""
|
||||
echo -e "Uninstalled Successfully, If you want to remove this script, then after exiting the script run ${green}rm /usr/bin/x-ui -f${plain} to delete it."
|
||||
|
@ -150,8 +150,8 @@ reset_user() {
|
|||
[[ -z $config_account ]] && config_account=$(date +%s%N | md5sum | cut -c 1-8)
|
||||
read -rp "Please set the login password [default is a random password]: " config_password
|
||||
[[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8)
|
||||
/usr/local/3x-ui-p1/x-ui setting -username ${config_account} -password ${config_password} >/dev/null 2>&1
|
||||
/usr/local/3x-ui-p1/x-ui setting -remove_secret >/dev/null 2>&1
|
||||
/usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password} >/dev/null 2>&1
|
||||
/usr/local/x-ui/x-ui setting -remove_secret >/dev/null 2>&1
|
||||
echo -e "Panel login username has been reset to: ${green} ${config_account} ${plain}"
|
||||
echo -e "Panel login password has been reset to: ${green} ${config_password} ${plain}"
|
||||
echo -e "${yellow} Panel login secret token disabled ${plain}"
|
||||
|
@ -167,13 +167,13 @@ reset_config() {
|
|||
fi
|
||||
return 0
|
||||
fi
|
||||
/usr/local/3x-ui-p1/x-ui setting -reset
|
||||
/usr/local/x-ui/x-ui setting -reset
|
||||
echo -e "All panel settings have been reset to default, Please restart the panel now, and use the default ${green}2053${plain} Port to Access the web Panel"
|
||||
confirm_restart
|
||||
}
|
||||
|
||||
check_config() {
|
||||
info=$(/usr/local/3x-ui-p1/x-ui setting -show true)
|
||||
info=$(/usr/local/x-ui/x-ui setting -show true)
|
||||
if [[ $? != 0 ]]; then
|
||||
LOGE "get current settings error, please check logs"
|
||||
show_menu
|
||||
|
@ -187,7 +187,7 @@ set_port() {
|
|||
LOGD "Cancelled"
|
||||
before_show_menu
|
||||
else
|
||||
/usr/local/3x-ui-p1/x-ui setting -port ${port}
|
||||
/usr/local/x-ui/x-ui setting -port ${port}
|
||||
echo -e "The port is set, Please restart the panel now, and use the new port ${green}${port}${plain} to access web panel"
|
||||
confirm_restart
|
||||
fi
|
||||
|
@ -487,7 +487,7 @@ open_ports() {
|
|||
}
|
||||
|
||||
update_geo() {
|
||||
local defaultBinFolder="/usr/local/3x-ui-p1/bin"
|
||||
local defaultBinFolder="/usr/local/x-ui/bin"
|
||||
read -p "Please enter x-ui bin folder path. Leave blank for default. (Default: '${defaultBinFolder}')" binFolder
|
||||
binFolder=${binFolder:-${defaultBinFolder}}
|
||||
if [[ ! -d ${binFolder} ]]; then
|
||||
|
|
Loading…
Reference in a new issue