Shuliyey / rancher-redis-cluster

rancher redis cluster
7 stars 18 forks source link

Update docker-entrypoint.sh #2

Closed insekticid closed 6 years ago

insekticid commented 7 years ago

disable slaveof on new master

Shuliyey commented 6 years ago

thanks for the contribution @insekticid

would you be able to change this line

sed -i "s/^slaveof/#slaveof/g" /usr/local/etc/redis/redis.conf

to

sed -i -E "s/^ *slaveof +([^ ]*)$/#slaveof \1/g" /usr/local/etc/redis/redis.conf

Cheers