From 30059f9bc1580bbfeecfcd95bd3a11a6e3ffe060 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 10 Jul 2022 12:08:04 +0800 Subject: [PATCH] Update swoole.sh --- plugins/php-apt/versions/common/swoole.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/php-apt/versions/common/swoole.sh b/plugins/php-apt/versions/common/swoole.sh index 53def0d0a..01f8ec4ff 100755 --- a/plugins/php-apt/versions/common/swoole.sh +++ b/plugins/php-apt/versions/common/swoole.sh @@ -18,8 +18,26 @@ LIBNAME=swoole LIBV=4.8.10 +APT_INSTALL=0 + if [ `echo "$version < 7.0"|bc` -eq 1 ];then LIBV=1.10.1 +elif [ `echo "$version < 7.2"|bc` -eq 1 ];then + LIBV=4.5.2 +else + echo 'ok' + APT_INSTALL=1 +fi + + +# to Apt +if [ "$APT_INSTALL" == "1" ];then + if [ "$actionType" == 'install' ];then + apt install -y php${version}-${LIBNAME} + elif [ "$actionType" == 'uninstall' ];then + apt remove -y php${version}-${LIBNAME} + fi + exit 0 fi