Safe way to restart redis??

119 views
Skip to first unread message

yan lambiel

unread,
Aug 24, 2017, 6:57:41 AM8/24/17
to Redis DB
 Dear all,
        I ant to use shell script  to restart redis and the redis-server cannot stop or start sometimes. 
        so, which way is safe to restart redis when redis-server used as daemon process and not used AOF/RDB? 

    restart() {
        kill `cat redis.pid`
        path=`pwd`
        $path/redis-server redis.conf
    }
             
    case $1 in
        restart)
            restart 
            ;;
        *)
        echo "usage: $0 start|stop|restart version"
        ;;
    esac 
Reply all
Reply to author
Forward
0 new messages