|
|
|
@ -10,27 +10,9 @@ serverPath=$(dirname "$rootPath") |
|
|
|
|
|
|
|
|
|
install_tmp=${rootPath}/tmp/mw_install.pl |
|
|
|
|
|
|
|
|
|
_os=`uname` |
|
|
|
|
echo "use system: ${_os}" |
|
|
|
|
if [ ${_os} == "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 "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then |
|
|
|
|
OSNAME='rocky' |
|
|
|
|
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then |
|
|
|
|
OSNAME='alma' |
|
|
|
|
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 |
|
|
|
|
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_pm2() |
|
|
|
|