pull/577/head
Mr Chen 12 months ago
parent 2f0f6eaed6
commit cbf3a15bf0
  1. 23
      plugins/redis/install.sh
  2. 7
      plugins/sphinx/install.sh

@ -25,14 +25,16 @@ Install_App()
{ {
echo '正在安装脚本文件...' > $install_tmp echo '正在安装脚本文件...' > $install_tmp
mkdir -p $serverPath/source mkdir -p $serverPath/source
mkdir -p $serverPath/source/redis
if [ ! -f $serverPath/source/redis-${VERSION}.tar.gz ];then FILE_TGZ=redis-${VERSION}.tar.gz
wget -O $serverPath/source/redis-${VERSION}.tar.gz http://download.redis.io/releases/redis-${VERSION}.tar.gz REDIS_DIR=$serverPath/source/redis
fi
cd $serverPath/source && tar -zxvf redis-${VERSION}.tar.gz
if [ ! -f $REDIS_DIR/${FILE_TGZ} ];then
wget -O $REDIS_DIR/${FILE_TGZ} http://download.redis.io/releases/${FILE_TGZ}
fi
cd $REDIS_DIR && tar -zxvf ${FILE_TGZ}
CMD_MAKE=`which gmake` CMD_MAKE=`which gmake`
if [ "$?" == "0" ];then if [ "$?" == "0" ];then
@ -55,8 +57,8 @@ Install_App()
echo '安装失败!' echo '安装失败!'
fi fi
if [ -d $serverPath/source/redis-${VERSION} ];then if [ -d ${REDIS_DIR}/redis-${VERSION} ];then
rm -rf $serverPath/source/redis-${VERSION} rm -rf ${REDIS_DIR}/redis-${VERSION}
fi fi
} }
@ -80,8 +82,11 @@ Uninstall_App()
$serverPath/redis/initd/redis stop $serverPath/redis/initd/redis stop
fi fi
rm -rf $serverPath/redis if [ -d $serverPath/redis ];then
echo "Uninstall_redis" > $install_tmp rm -rf $serverPath/redis
fi
echo "卸载redis成功"
} }
action=$1 action=$1

@ -18,8 +18,7 @@ install_tmp=${rootPath}/tmp/mw_install.pl
# /Users/midoks/Desktop/mwdev/server/sphinx/bin/bin/indexer /Users/midoks/Desktop/mwdev/server/sphinx/sphinx.conf 99cms_mc_comic --rotate # /Users/midoks/Desktop/mwdev/server/sphinx/bin/bin/indexer /Users/midoks/Desktop/mwdev/server/sphinx/sphinx.conf 99cms_mc_comic --rotate
bash ${rootPath}/scripts/getos.sh bash ${rootPath}/scripts/getos.sh
echo "bash ${rootPath}/scripts/getos.sh" # echo "bash ${rootPath}/scripts/getos.sh"
OSNAME="macos" OSNAME="macos"
if [ -f ${rootPath}/data/osname.pl ];then if [ -f ${rootPath}/data/osname.pl ];then
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
@ -139,12 +138,12 @@ Uninstall_sphinx()
systemctl daemon-reload systemctl daemon-reload
fi fi
echo "$serverPath/sphinx/initd/sphinx"
if [ -f $serverPath/sphinx/initd/sphinx ];then if [ -f $serverPath/sphinx/initd/sphinx ];then
$serverPath/sphinx/initd/sphinx stop $serverPath/sphinx/initd/sphinx stop
fi fi
if [ -f $serverPath/sphinx ];then if [ -d $serverPath/sphinx ];then
echo "rm -rf $serverPath/sphinx"
rm -rf $serverPath/sphinx rm -rf $serverPath/sphinx
fi fi

Loading…
Cancel
Save