update redis

pull/109/head
midoks 5 years ago
parent 5029c2e922
commit e5d057867a
  1. 3
      plugins/redis/index.py
  2. 4
      plugins/redis/info.json
  3. 14
      plugins/redis/install.sh

@ -60,7 +60,8 @@ def getArgs():
def status(): def status():
data = public.execShell( data = public.execShell(
"ps -ef|grep redis |grep -v grep | grep -v python | awk '{print $2}'") "ps -ef|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
if data[0] == '': if data[0] == '':
return 'stop' return 'stop'
return 'start' return 'start'

@ -4,8 +4,8 @@
"name": "redis", "name": "redis",
"title": "Redis", "title": "Redis",
"shell": "install.sh", "shell": "install.sh",
"versions":["4.0"], "versions":["6.0.4","5.0.8","4.0.11"],
"updates":["4.0.11"], "updates":["6.0.4","5.0.8","4.0.11"],
"tip": "soft", "tip": "soft",
"checks": "server/redis", "checks": "server/redis",
"path": "server/redis", "path": "server/redis",

@ -10,20 +10,24 @@ serverPath=$(dirname "$rootPath")
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=$2
Install_redis() Install_redis()
{ {
echo '正在安装脚本文件...' > $install_tmp echo '正在安装脚本文件...' > $install_tmp
mkdir -p $serverPath/source
wget -O $serverPath/source/redis.tar.gz http://download.redis.io/releases/redis-4.0.11.tar.gz if [ ! -f $serverPath/source/redis-${VERSION}.tar.gz ];then
cd $serverPath/source && tar -zxvf redis.tar.gz wget -O $serverPath/source/redis-${VERSION}.tar.gz http://download.redis.io/releases/redis-${VERSION}.tar.gz
fi
cd $serverPath/source && tar -zxvf redis-${VERSION}.tar.gz
mkdir -p $serverPath/redis mkdir -p $serverPath/redis
cd redis* && make PREFIX=$serverPath/redis install cd redis-${VERSION} && make PREFIX=$serverPath/redis install
sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf
echo '4.0' > $serverPath/redis/version.pl echo "${VERSION}" > $serverPath/redis/version.pl
echo '安装完成' > $install_tmp echo '安装完成' > $install_tmp
} }

Loading…
Cancel
Save