mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
find master by host and ip
This commit is contained in:
parent
7d7404a8ae
commit
e4bd0085cc
@ -34,7 +34,7 @@ spec:
|
||||
fi
|
||||
else
|
||||
echo "sentinel found, finding master"
|
||||
MASTER="$(redis-cli -h sentinel -p 5000 sentinel get-master-addr-by-name mymaster | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
|
||||
MASTER="$(redis-cli -h sentinel -p 5000 sentinel get-master-addr-by-name mymaster | grep -E '(^redis-\d{1,})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})')"
|
||||
echo "master found : $MASTER, updating redis.conf"
|
||||
echo "slaveof $MASTER 6379" >> /etc/redis/redis.conf
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user