diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 0e20cc1cf..5536d9bd5 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -60,7 +60,8 @@ def getArgs(): def status(): 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] == '': return 'stop' return 'start' diff --git a/plugins/redis/info.json b/plugins/redis/info.json index 938076319..668d09b39 100755 --- a/plugins/redis/info.json +++ b/plugins/redis/info.json @@ -4,8 +4,8 @@ "name": "redis", "title": "Redis", "shell": "install.sh", - "versions":["4.0"], - "updates":["4.0.11"], + "versions":["6.0.4","5.0.8","4.0.11"], + "updates":["6.0.4","5.0.8","4.0.11"], "tip": "soft", "checks": "server/redis", "path": "server/redis", diff --git a/plugins/redis/install.sh b/plugins/redis/install.sh index 45057cf6f..ee196d654 100755 --- a/plugins/redis/install.sh +++ b/plugins/redis/install.sh @@ -10,20 +10,24 @@ serverPath=$(dirname "$rootPath") install_tmp=${rootPath}/tmp/mw_install.pl +VERSION=$2 Install_redis() { - 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 - cd $serverPath/source && tar -zxvf redis.tar.gz + if [ ! -f $serverPath/source/redis-${VERSION}.tar.gz ];then + 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 - cd redis* && make PREFIX=$serverPath/redis install + cd redis-${VERSION} && make PREFIX=$serverPath/redis install sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf - echo '4.0' > $serverPath/redis/version.pl + echo "${VERSION}" > $serverPath/redis/version.pl echo '安装完成' > $install_tmp }