From dff4551fb17f623fa77a74589fb38d2ac56c21df Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 8 Aug 2023 16:45:46 +0800 Subject: [PATCH] update --- plugins/mysql-apt/install.sh | 6 +++++- plugins/mysql-apt/versions/5.7/install.sh | 17 ++++++++++++++++- plugins/mysql-apt/versions/8.0/install.sh | 4 ++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/plugins/mysql-apt/install.sh b/plugins/mysql-apt/install.sh index c0425ca95..c95756c58 100755 --- a/plugins/mysql-apt/install.sh +++ b/plugins/mysql-apt/install.sh @@ -48,7 +48,11 @@ fi sh -x $curPath/versions/$2/install.sh $1 if [ "${action}" == "install" ];then -# #初始化 + #初始化 + + if [ "$?" != "0" ];then + exit $? + fi cd ${rootPath} && python3 ${rootPath}/plugins/mysql-apt/index.py start ${type} cd ${rootPath} && python3 ${rootPath}/plugins/mysql-apt/index.py initd_install ${type} fi diff --git a/plugins/mysql-apt/versions/5.7/install.sh b/plugins/mysql-apt/versions/5.7/install.sh index 76061832d..bd3f5eedd 100755 --- a/plugins/mysql-apt/versions/5.7/install.sh +++ b/plugins/mysql-apt/versions/5.7/install.sh @@ -35,7 +35,22 @@ if [ "$OSNAME" == "ubuntu" ];then VERSION_ID="18.04" fi -SUFFIX_NAME=${MYSQL_VER}-1${OSNAME}${VERSION_ID}_amd64 +ARCH="amd64" +TMP_ARCH=`arch` +if [ "$TMP_ARCH" == "x86_64" ];then + ARCH="amd64" +elif [ "$TMP_ARCH" == "aarch64" ];then + ARCH="arm64" +else + ARCH="amd64" +fi + +if [ "$ARCH" != "amd64" ];then + echo "暂时不支持该${ARCH}" > $install_tmp + exit 0 +fi + +SUFFIX_NAME=${MYSQL_VER}-1${OSNAME}${VERSION_ID}_${ARCH} APT_INSTALL() { diff --git a/plugins/mysql-apt/versions/8.0/install.sh b/plugins/mysql-apt/versions/8.0/install.sh index 2275a71ca..9746c2901 100755 --- a/plugins/mysql-apt/versions/8.0/install.sh +++ b/plugins/mysql-apt/versions/8.0/install.sh @@ -30,12 +30,12 @@ if [ "$TMP_ARCH" == "x86_64" ];then elif [ "$TMP_ARCH" == "aarch64" ];then ARCH="arm64" else - echo $ARCH + ARCH="amd64" fi if [ "$ARCH" != "amd64" ];then echo "暂时不支持该${ARCH}" > $install_tmp - exit 0 + exit 1 fi