From 8b85ef108f5ed3da8d6775dcc7d42784ea291219 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 12 Jul 2022 23:16:20 +0800 Subject: [PATCH] Update install.sh --- plugins/varnish/install.sh | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/plugins/varnish/install.sh b/plugins/varnish/install.sh index 95e5365d8..afb5471c2 100755 --- a/plugins/varnish/install.sh +++ b/plugins/varnish/install.sh @@ -7,27 +7,14 @@ rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") - install_tmp=${rootPath}/tmp/mw_install.pl - VERSION=$2 -_os=`uname` -if [ ${_os} == "Darwin" ]; then - OSNAME='macos' -elif grep -Eq "openSUSE" /etc/*-release; then - OSNAME='opensuse' -elif grep -Eq "CentOS" /etc/*-release; then - OSNAME='centos' -elif grep -Eq "Fedora" /etc/*-release; then - OSNAME='fedora' -elif grep -Eq "Debian" /etc/*-release; then - OSNAME='debian' -elif grep -Eq "Ubuntu" /etc/*-release; then - OSNAME='ubuntu' -else - OSNAME='unknow' -fi + +bash ${rootPath}/scripts/getos.sh +OSNAME=`cat ${rootPath}/data/osname.pl` +OSNAME_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + Install_varnish() {