diff --git a/plugins/php/versions/53/apc.sh b/plugins/php/versions/53/apc.sh index 366220eaf..9506309bc 100755 --- a/plugins/php/versions/53/apc.sh +++ b/plugins/php/versions/53/apc.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -73,8 +79,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/eaccelerator.sh b/plugins/php/versions/53/eaccelerator.sh index b2caa3fd7..7f2677990 100755 --- a/plugins/php/versions/53/eaccelerator.sh +++ b/plugins/php/versions/53/eaccelerator.sh @@ -22,6 +22,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -78,8 +84,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/intl.sh b/plugins/php/versions/53/intl.sh index ae11f1c96..64a781c30 100755 --- a/plugins/php/versions/53/intl.sh +++ b/plugins/php/versions/53/intl.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -70,8 +76,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/memcache.sh b/plugins/php/versions/53/memcache.sh index 4c9b34748..5b4c760d1 100755 --- a/plugins/php/versions/53/memcache.sh +++ b/plugins/php/versions/53/memcache.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -68,8 +74,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/memcached.sh b/plugins/php/versions/53/memcached.sh index 57385c4d8..0b7605a93 100755 --- a/plugins/php/versions/53/memcached.sh +++ b/plugins/php/versions/53/memcached.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -37,12 +43,10 @@ Install_lib() cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz fi cd $php_lib/${LIBNAME}-${LIBV} - + $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --with-zlib-dir=$serverPath/lib/zlib - make && make install && make clean + --enable-memcached && make && make install && make clean fi @@ -74,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/mongo.sh b/plugins/php/versions/53/mongo.sh index a5ffaf7e6..49d24f0b7 100755 --- a/plugins/php/versions/53/mongo.sh +++ b/plugins/php/versions/53/mongo.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -79,8 +85,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/opcache.sh b/plugins/php/versions/53/opcache.sh index 907bb0f1a..498ca06c2 100755 --- a/plugins/php/versions/53/opcache.sh +++ b/plugins/php/versions/53/opcache.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -77,17 +83,14 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - if [ ! -f "$extFile" ];then echo "php-$version 未安装${LIBNAME},请选择其它版本!" echo "php-$version not install ${LIBNAME}, Plese select other version!" return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile diff --git a/plugins/php/versions/53/redis.sh b/plugins/php/versions/53/redis.sh index 41b1cc84b..ec116c3c8 100755 --- a/plugins/php/versions/53/redis.sh +++ b/plugins/php/versions/53/redis.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -74,8 +80,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/seaslog.sh b/plugins/php/versions/53/seaslog.sh index 2fe2aed15..db7c09930 100755 --- a/plugins/php/versions/53/seaslog.sh +++ b/plugins/php/versions/53/seaslog.sh @@ -20,6 +20,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` @@ -81,8 +87,8 @@ Uninstall_lib() return fi _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - sed -i '_bak' "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/solr.sh b/plugins/php/versions/53/solr.sh index c646ef60e..56b242f25 100755 --- a/plugins/php/versions/53/solr.sh +++ b/plugins/php/versions/53/solr.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -79,8 +85,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/swoole.sh b/plugins/php/versions/53/swoole.sh index c875ed973..e0388bbc3 100755 --- a/plugins/php/versions/53/swoole.sh +++ b/plugins/php/versions/53/swoole.sh @@ -22,6 +22,13 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then fi extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -90,8 +97,8 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/xdebug.sh b/plugins/php/versions/53/xdebug.sh index eb1ddd589..06e06ee93 100755 --- a/plugins/php/versions/53/xdebug.sh +++ b/plugins/php/versions/53/xdebug.sh @@ -18,6 +18,13 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so + +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -72,8 +79,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/xhprof.sh b/plugins/php/versions/53/xhprof.sh index 1458a45d9..e4d724593 100755 --- a/plugins/php/versions/53/xhprof.sh +++ b/plugins/php/versions/53/xhprof.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -71,8 +77,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/yaf.sh b/plugins/php/versions/53/yaf.sh index 505f92193..837a89378 100755 --- a/plugins/php/versions/53/yaf.sh +++ b/plugins/php/versions/53/yaf.sh @@ -23,6 +23,12 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ LIBV='3.0.7'; fi +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -79,9 +85,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/yaf.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/yar.sh b/plugins/php/versions/53/yar.sh index cf325ef02..973d05601 100755 --- a/plugins/php/versions/53/yar.sh +++ b/plugins/php/versions/53/yar.sh @@ -23,6 +23,12 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ LIBV='2.0.5' fi +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -81,9 +87,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/53/zendguardloader.sh b/plugins/php/versions/53/zendguardloader.sh index 256fed436..5abd8ccf3 100755 --- a/plugins/php/versions/53/zendguardloader.sh +++ b/plugins/php/versions/53/zendguardloader.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -76,9 +82,9 @@ Uninstall_lib() return fi - sed -i '_bak' "/ZendGuardLoader.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/zend_loader/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/ZendGuardLoader.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/zend_loader/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[Zend ZendGuard Loader\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/imagemagick.sh b/plugins/php/versions/56/imagemagick.sh index 07952cd8b..540ddfe06 100755 --- a/plugins/php/versions/56/imagemagick.sh +++ b/plugins/php/versions/56/imagemagick.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -74,8 +80,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/memcache.sh b/plugins/php/versions/56/memcache.sh index c493b572f..b8b6f2ca3 100755 --- a/plugins/php/versions/56/memcache.sh +++ b/plugins/php/versions/56/memcache.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -68,8 +74,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/mongo.sh b/plugins/php/versions/56/mongo.sh index b6bf08709..3aeb4a142 100755 --- a/plugins/php/versions/56/mongo.sh +++ b/plugins/php/versions/56/mongo.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -77,8 +83,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/mongodb.sh b/plugins/php/versions/56/mongodb.sh index ccac46bdf..7cfbff842 100755 --- a/plugins/php/versions/56/mongodb.sh +++ b/plugins/php/versions/56/mongodb.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -72,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/opcache.sh b/plugins/php/versions/56/opcache.sh index f79b68982..8132c5911 100755 --- a/plugins/php/versions/56/opcache.sh +++ b/plugins/php/versions/56/opcache.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -45,8 +51,8 @@ Install_lib() Uninstall_lib() { - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===============================================' diff --git a/plugins/php/versions/56/redis.sh b/plugins/php/versions/56/redis.sh index 1433cfb42..1db607b3c 100755 --- a/plugins/php/versions/56/redis.sh +++ b/plugins/php/versions/56/redis.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -72,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/seaslog.sh b/plugins/php/versions/56/seaslog.sh index a6762b730..3857e382d 100755 --- a/plugins/php/versions/56/seaslog.sh +++ b/plugins/php/versions/56/seaslog.sh @@ -20,6 +20,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` @@ -79,8 +85,8 @@ Uninstall_lib() return fi _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - sed -i '_bak' "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/solr.sh b/plugins/php/versions/56/solr.sh index a12821cbe..078e79f19 100755 --- a/plugins/php/versions/56/solr.sh +++ b/plugins/php/versions/56/solr.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -78,8 +84,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/swoole.sh b/plugins/php/versions/56/swoole.sh index 9f5e89fea..9a894bd21 100755 --- a/plugins/php/versions/56/swoole.sh +++ b/plugins/php/versions/56/swoole.sh @@ -22,6 +22,13 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then fi extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -87,8 +94,8 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/xdebug.sh b/plugins/php/versions/56/xdebug.sh index 87286a8e0..cb37c92d0 100755 --- a/plugins/php/versions/56/xdebug.sh +++ b/plugins/php/versions/56/xdebug.sh @@ -18,6 +18,13 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -71,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/xhprof.sh b/plugins/php/versions/56/xhprof.sh index 777fe4f6b..346d77ab3 100755 --- a/plugins/php/versions/56/xhprof.sh +++ b/plugins/php/versions/56/xhprof.sh @@ -18,6 +18,13 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -71,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/yaf.sh b/plugins/php/versions/56/yaf.sh index 8532af12d..9340546ae 100755 --- a/plugins/php/versions/56/yaf.sh +++ b/plugins/php/versions/56/yaf.sh @@ -14,6 +14,14 @@ sourcePath=${serverPath}/source/php LIBNAME=yaf LIBV=2.3.5 +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + + Install_lib() { extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/yaf.so @@ -67,9 +75,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/yaf.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/yaf.use_namespace/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/\[yaf\]/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/yaf.so/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/yaf.use_namespace/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/\[yaf\]/d' $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/yar.sh b/plugins/php/versions/56/yar.sh index bff1b9339..774c0e612 100755 --- a/plugins/php/versions/56/yar.sh +++ b/plugins/php/versions/56/yar.sh @@ -23,6 +23,13 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ LIBV='2.0.5' fi +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -80,9 +87,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/56/zendguardloader.sh b/plugins/php/versions/56/zendguardloader.sh index af986d8f6..08f8ea30e 100755 --- a/plugins/php/versions/56/zendguardloader.sh +++ b/plugins/php/versions/56/zendguardloader.sh @@ -14,6 +14,11 @@ sourcePath=${serverPath}/source/php LIBNAME=ZendGuardLoader sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi Install_lib() { @@ -69,9 +74,9 @@ Uninstall_lib() return fi - sed -i '_bak' '/ZendGuardLoader.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/zend_loader/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/ZendGuardLoader.so/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/zend_loader/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/\[Zend ZendGuard Loader\]/d' $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/imagemagick.sh b/plugins/php/versions/71/imagemagick.sh index be8736de8..13f8ea67a 100755 --- a/plugins/php/versions/71/imagemagick.sh +++ b/plugins/php/versions/71/imagemagick.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -73,8 +79,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/memcached.sh b/plugins/php/versions/71/memcached.sh index 564a44165..73905a2a9 100755 --- a/plugins/php/versions/71/memcached.sh +++ b/plugins/php/versions/71/memcached.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -40,7 +46,6 @@ Install_lib() $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --enable-memcached \ - --with-zlib-dir=$serverPath/lib/zlib \ --disable-memcached-sasl && \ make && make install && make clean @@ -74,8 +79,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/mongodb.sh b/plugins/php/versions/71/mongodb.sh index 50cf70482..9bca2016d 100755 --- a/plugins/php/versions/71/mongodb.sh +++ b/plugins/php/versions/71/mongodb.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -71,8 +77,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/opcache.sh b/plugins/php/versions/71/opcache.sh index 8c68eb09a..06876ee54 100755 --- a/plugins/php/versions/71/opcache.sh +++ b/plugins/php/versions/71/opcache.sh @@ -18,6 +18,12 @@ actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -45,8 +51,8 @@ Install_lib() Uninstall_lib() { - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===============================================' diff --git a/plugins/php/versions/71/redis.sh b/plugins/php/versions/71/redis.sh index ddf278a80..b7298d4e6 100755 --- a/plugins/php/versions/71/redis.sh +++ b/plugins/php/versions/71/redis.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -72,8 +78,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/seaslog.sh b/plugins/php/versions/71/seaslog.sh index b25e16296..b74f5632f 100755 --- a/plugins/php/versions/71/seaslog.sh +++ b/plugins/php/versions/71/seaslog.sh @@ -20,6 +20,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` @@ -81,8 +87,8 @@ Uninstall_lib() return fi _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - sed -i '_bak' "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/solr.sh b/plugins/php/versions/71/solr.sh index f0a02c489..8afdf5bd3 100755 --- a/plugins/php/versions/71/solr.sh +++ b/plugins/php/versions/71/solr.sh @@ -19,6 +19,12 @@ version=$2 extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/ +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -78,8 +84,8 @@ Uninstall_lib() return fi - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/swoole.sh b/plugins/php/versions/71/swoole.sh index 74e94940b..684c04378 100755 --- a/plugins/php/versions/71/swoole.sh +++ b/plugins/php/versions/71/swoole.sh @@ -18,6 +18,13 @@ LIBV=4.5.1 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -84,8 +91,8 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/xdebug.sh b/plugins/php/versions/71/xdebug.sh index 22f780ffc..325b68bfa 100755 --- a/plugins/php/versions/71/xdebug.sh +++ b/plugins/php/versions/71/xdebug.sh @@ -13,11 +13,17 @@ sourcePath=${serverPath}/source/php LIBNAME=xdebug LIBV=2.7.0 -sysName=`uname` actionType=$1 version=$2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` @@ -70,8 +76,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini - sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini + sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/yac.sh b/plugins/php/versions/71/yac.sh index 09e251fed..58eb76c0e 100755 --- a/plugins/php/versions/71/yac.sh +++ b/plugins/php/versions/71/yac.sh @@ -12,7 +12,6 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php - actionType=$1 version=$2 @@ -20,6 +19,13 @@ LIBNAME=yac LIBV=2.0.2 extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -77,8 +83,8 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/yaf.sh b/plugins/php/versions/71/yaf.sh index 3b9763d37..5f4310b01 100755 --- a/plugins/php/versions/71/yaf.sh +++ b/plugins/php/versions/71/yaf.sh @@ -16,9 +16,15 @@ version=$2 LIBNAME=yaf LIBV=3.0.8 - extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -74,9 +80,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/yar.sh b/plugins/php/versions/71/yar.sh index 05e54105d..514ea5dc6 100755 --- a/plugins/php/versions/71/yar.sh +++ b/plugins/php/versions/71/yar.sh @@ -22,6 +22,13 @@ if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ LIBV=2.0.5 fi +sysName=`uname` +if [ "$sysName" == "Darwin" ];then + BAK='_bak' +else + BAK='' +fi + Install_lib() { @@ -82,9 +89,9 @@ Uninstall_lib() fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini + sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini rm -f $extFile $serverPath/php/init.d/php$version reload