- manage redis/sentinel clusters - ensure ulimit_managed is false - dynamically find servers in role to identify master - add redisadm and sentineladm commands - add script to check if the current host in the master
10 lines
288 B
Plaintext
10 lines
288 B
Plaintext
#!/usr/bin/bash
|
|
REDIS_HOST=<%= @redis_host %>
|
|
SENTINEL_PORT=<%= @sentinel_port %>
|
|
|
|
if [ $# -gt 0 ]; then
|
|
REDISCLI_AUTH=<%= @requirepass %> redis-cli -h "$REDIS_HOST" -p "$SENTINEL_PORT" "$@"
|
|
else
|
|
REDISCLI_AUTH=<%= @requirepass %> redis-cli -h "$REDIS_HOST" -p "$SENTINEL_PORT"
|
|
fi
|