mirror of https://github.com/midoks/mdserver-web
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.
47 lines
1.2 KiB
47 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")
|
||
|
serverPath=$(dirname "$rootPath")
|
||
|
|
||
3 years ago
|
|
||
3 years ago
|
# cd /www/server/mdserver-web/plugins/mysql-yum && bash install.sh install 8.0
|
||
|
# cd /www/server/mdserver-web/plugins/mysql-yum && bash install.sh uninstall 8.0
|
||
|
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-yum/index.py start 8.0
|
||
3 years ago
|
|
||
|
install_tmp=${rootPath}/tmp/mw_install.pl
|
||
|
|
||
|
|
||
|
action=$1
|
||
|
type=$2
|
||
|
|
||
3 years ago
|
|
||
|
|
||
3 years ago
|
if [ "${2}" == "" ];then
|
||
|
echo '缺少安装脚本...' > $install_tmp
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
if [ ! -d $curPath/versions/$2 ];then
|
||
|
echo '缺少安装脚本2...' > $install_tmp
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
3 years ago
|
if [ "${action}" == "uninstall" ];then
|
||
|
|
||
3 years ago
|
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-yum/index.py stop ${type}
|
||
|
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-yum/index.py initd_uninstall ${type}
|
||
3 years ago
|
cd $curPath
|
||
3 years ago
|
fi
|
||
3 years ago
|
|
||
|
sh -x $curPath/versions/$2/install.sh $1
|
||
|
|
||
3 years ago
|
if [ "${action}" == "install" ];then
|
||
3 years ago
|
# #初始化
|
||
3 years ago
|
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-yum/index.py start ${type}
|
||
|
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-yum/index.py initd_install ${type}
|
||
3 years ago
|
fi
|