Merge pull request #1176 from OiAnthony/fix_alpine_check_system

Fix alpine check system
This commit is contained in:
mack-a
2025-06-09 11:13:34 +08:00
committed by GitHub

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
@@ -1108,6 +1108,11 @@ installTools() {
${installType} binutils >/dev/null 2>&1
fi
if ! find /usr/bin /usr/sbin | grep -q -w openssl; then
echoContent green " ---> 安装openssl"
${installType} openssl >/dev/null 2>&1
fi
if ! find /usr/bin /usr/sbin | grep -q -w ping6; then
echoContent green " ---> 安装ping6"
${installType} inetutils-ping >/dev/null 2>&1