diff --git a/3x-ui/install.sh b/3x-ui/install.sh index 552fd2a..05c084f 100644 --- a/3x-ui/install.sh +++ b/3x-ui/install.sh @@ -11,6 +11,10 @@ cur_dir=$(pwd) # 检查root权限 [[ $EUID -ne 0 ]] && echo -e "${red}致命错误: ${plain} 请使用root权限运行此脚本 \n " && exit 1 +if ! ip addr show lo | grep -q '127.0.0.1'; then + sudo ip addr add 127.0.0.1/8 dev lo +fi + # 检查操作系统并设置发行版变量 if [[ -f /etc/os-release ]]; then source /etc/os-release diff --git a/s-ui/install.sh b/s-ui/install.sh index 8430705..c81de77 100644 --- a/s-ui/install.sh +++ b/s-ui/install.sh @@ -10,6 +10,10 @@ cur_dir=$(pwd) # check root [[ $EUID -ne 0 ]] && echo -e "${red}致命错误: ${plain} 请使用root权限运行此脚本 \n " && exit 1 +if ! ip addr show lo | grep -q '127.0.0.1'; then + sudo ip addr add 127.0.0.1/8 dev lo +fi + # Check OS and set release variable if [[ -f /etc/os-release ]]; then source /etc/os-release