bugfix of redis-5.0.14 start failed

Signed-off-by: huangtuq <tuquanhuang@linux.alibaba.com>
This commit is contained in:
huangtuq 2022-12-02 17:08:50 +08:00
parent 81a27f4dc7
commit 95459cd18f
4 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ stop_redis() {
echo ${redis_version}
if [ $redis_version -lt 5 ]
then
pkill redis-server
kill -9 `ps -e | grep redis-server | awk '{print $1}'`
else
systemctl stop redis.service
fi

View File

@ -52,6 +52,7 @@ setup_redis() {
tar -zxvf ${REDIS_PKG}
pushd ${REDIS_DIR}
make && make install
cp redis.conf /usr/local/bin/
if [ $? -ne 0 ]
then
echo "redis compile or install error, exit 1"
@ -73,7 +74,7 @@ start_app() {
then
systemctl stop redis
fi
/usr/local/bin/redis-server &
/usr/local/bin/redis-server /usr/local/bin/redis.conf &
else
systemctl enable redis.service
systemctl restart redis.service

View File

@ -5,7 +5,7 @@ start_redis() {
echo ${redis_version}
if [ $redis_version -lt 5 ]
then
/usr/local/bin/redis-server &
/usr/local/bin/redis-server /usr/local/bin/redis.conf &
else
systemctl start redis.service
fi

View File

@ -5,7 +5,7 @@ stop_redis() {
echo ${redis_version}
if [ $redis_version -lt 5 ]
then
pkill redis-server
kill -9 `ps -e | grep redis-server | awk '{print $1}'`
else
systemctl stop redis.service
fi