From 7cd7aaa8d0b36aad9ea8aed4d626be9512d96a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 4 Jul 2023 02:10:17 +0800 Subject: [PATCH] fix(plugin): openresty OS check --- scripts/plugins/openresty/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/plugins/openresty/install.sh b/scripts/plugins/openresty/install.sh index ffe4ed19..1f12be6e 100644 --- a/scripts/plugins/openresty/install.sh +++ b/scripts/plugins/openresty/install.sh @@ -19,8 +19,8 @@ limitations under the License. HR="+----------------------------------------------------" ARCH=$(uname -m) +OS=$(source /etc/os-release && { [[ "$ID" == "debian" ]] && echo "debian"; } || { [[ "$ID" == "centos" ]] || [[ "$ID" == "rhel" ]] || [[ "$ID" == "rocky" ]] || [[ "$ID" == "almalinux" ]] && echo "centos"; } || echo "unknown") cpuCore=$(cat /proc/cpuinfo | grep "processor" | wc -l) -OS=$(source /etc/os-release && [[ "$ID" == "debian" ]] && echo "debian" || { [[ "$ID" == "centos" ]] || [[ "$ID" == "rhel" ]] || [[ "$ID" == "rocky" ]] || [[ "$ID" == "almalinux" ]]; } && echo "centos" || echo "unknown") downloadUrl="https://dl.cdn.haozi.net" setupPath="/www" openrestyPath="${setupPath}/server/openresty"