wp-init: accept localized redis status (pt_BR prints Conectado)
This commit is contained in:
1 parent
4d666d1778
commit
9f07fad41c
1 file changed
+3
-2
+3
-2
@@ -345,8 +345,9 @@ if [ -n "$REDIS_HOST" ]; then
|
||||
REDIS_STATUS="$(wp_run redis status 2>/dev/null || true)"
|
||||
|
||||
# The status output may lead with the "Drop-ins: [...]" block, so the checks
|
||||
# match the key line anywhere in the output.
|
||||
if printf '%s' "$REDIS_STATUS" | grep -qE '^[[:space:]]*Status:[[:space:]]+Connected'; then
|
||||
# match the key line anywhere in the output. The Status word follows the
|
||||
# site locale (pt_BR prints "Conectado"), so both are accepted.
|
||||
if printf '%s' "$REDIS_STATUS" | grep -qE '^[[:space:]]*Status:[[:space:]]+(Connected|Conectado)'; then
|
||||
log "Redis object cache connected."
|
||||
else
|
||||
warn "Redis object cache could not connect — check the redis service."
|
||||
|
||||
Reference in new issue
Block a user