This commit is contained in:
starry
2025-09-16 09:25:54 +08:00
committed by GitHub
parent 3358b374bc
commit 3e8f025836
2 changed files with 8 additions and 0 deletions

View File

@@ -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