重启redis shell脚本
#!/bin/bash
ss -tnl | grep 6379
if [ $? -eq 0 ];then
ps -ef | grep redis | awk 'NR==1 {print $2}' | xargs kill -9 && nohup /usr/local/redis/redis-server /usr/local/redis/redis.conf > myout.file 2>&1 &
else
nohup /usr/local/redis/redis-server /usr/local/redis/redis.conf > myout.file 2>&1 &
fi
无可奈何花落去,似曾相识燕归来