fix(脚本): 优化Alpine系统判断逻辑

pull/1176/head
Anthony 2025-06-07 17:26:17 +08:00
parent b0406e4221
commit 9fc5c833b7
1 changed files with 6 additions and 6 deletions

View File

@ -58,6 +58,12 @@ checkSystem() {
removeType='yum -y remove'
upgrade="yum update -y --skip-broken"
checkCentosSELinux
elif { [[ -f "/etc/issue" ]] && grep -qi "Alpine" /etc/issue; } || { [[ -f "/proc/version" ]] && grep -qi "Alpine" /proc/version; }; then
release="alpine"
installType='apk add'
upgrade="apk update"
removeType='apk del'
nginxConfigPath=/etc/nginx/http.d/
elif { [[ -f "/etc/issue" ]] && grep -qi "debian" /etc/issue; } || { [[ -f "/proc/version" ]] && grep -qi "debian" /proc/version; } || { [[ -f "/etc/os-release" ]] && grep -qi "ID=debian" /etc/issue; }; then
release="debian"
installType='apt -y install'
@ -74,12 +80,6 @@ checkSystem() {
if grep </etc/issue -q -i "16."; then
release=
fi
elif { [[ -f "/etc/issue" ]] && grep -qi "Alpine" /etc/issue; } || { [[ -f "/proc/version" ]] && grep -qi "Alpine" /proc/version; }; then
release="alpine"
installType='apk add'
upgrade="apk update"
removeType='apk del'
nginxConfigPath=/etc/nginx/http.d/
fi
if [[ -z ${release} ]]; then