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)"
|
REDIS_STATUS="$(wp_run redis status 2>/dev/null || true)"
|
||||||
|
|
||||||
# The status output may lead with the "Drop-ins: [...]" block, so the checks
|
# The status output may lead with the "Drop-ins: [...]" block, so the checks
|
||||||
# match the key line anywhere in the output.
|
# match the key line anywhere in the output. The Status word follows the
|
||||||
if printf '%s' "$REDIS_STATUS" | grep -qE '^[[:space:]]*Status:[[:space:]]+Connected'; then
|
# 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."
|
log "Redis object cache connected."
|
||||||
else
|
else
|
||||||
warn "Redis object cache could not connect — check the redis service."
|
warn "Redis object cache could not connect — check the redis service."
|
||||||
|
|||||||
Reference in new issue
Block a user