Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/plugins/php-yum/versions/common.sh

61 lines
1.2 KiB

3 years ago
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
version=$1
action=$2
3 years ago
extName=$3
3 years ago
3 years ago
# echo $1,$2,$3
3 years ago
3 years ago
# echo $curPath
# echo $rootPath
# echo $serverPath
FILE=${curPath}/${version}/${extName}.sh
11 months ago
FILE_COMMON=${curPath}/common/${extName}.sh
3 years ago
# yum install -y php81-php-yar
2 years ago
# yum install -y php74-php-pecl-mysql
3 years ago
3 years ago
3 years ago
if [ "$action" == 'install' ];then
3 years ago
if [ -f $FILE ];then
bash ${curPath}/${version}/${extName}.sh install
11 months ago
elif [ -f $FILE_COMMON ];then
bash ${FILE_COMMON} install ${version}
3 years ago
else
11 months ago
yum install -y php${version}-php-${extName}
3 years ago
fi
2 years ago
# if [ "${extName}" == "mysql" ];then
# yum install -y php74-php-pecl-mysql
# fi
3 years ago
fi
# yum remove -y php81-php-yar
if [ "$action" == 'uninstall' ];then
3 years ago
if [ -f $FILE ];then
bash ${curPath}/${version}/${extName}.sh uninstall
11 months ago
elif [ -f $FILE_COMMON ];then
bash ${FILE_COMMON} uninstall ${version}
3 years ago
else
11 months ago
yum remove -y php${version}-php-${extName}
3 years ago
fi
3 years ago
fi
3 years ago
echo "yum install -y php${version}-php-${extName}"
echo "yum remove -y php${version}-php-${extName}"
2 years ago
bash ${rootPath}/plugins/php-yum/versions/lib.sh $version restart
3 years ago
3 years ago