From 8fde1c9964ad0980aeab588f934047977c40cc25 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Jul 2022 19:00:57 +0800 Subject: [PATCH] Update install.sh --- plugins/supervisor/install.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/plugins/supervisor/install.sh b/plugins/supervisor/install.sh index 2bed5e3bd..986ba9d6e 100755 --- a/plugins/supervisor/install.sh +++ b/plugins/supervisor/install.sh @@ -11,24 +11,10 @@ install_tmp=${rootPath}/tmp/mw_install.pl VERSION=$2 -sysName=`uname` -echo "use system: ${sysName}" +bash ${rootPath}/scripts/getos.sh +OSNAME=`cat ${rootPath}/data/osname.pl` +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` -if [ ${sysName} == "Darwin" ]; then - OSNAME='macos' -elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then - OSNAME='centos' -elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then - OSNAME='fedora' -elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then - OSNAME='debian' -elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then - OSNAME='ubuntu' -elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then - OSNAME='raspbian' -else - OSNAME='unknow' -fi Install_app() {