Last active
August 4, 2020 23:22
-
-
Save davidalger/634362ac83336d07eaea4a8cdfd7db2b to your computer and use it in GitHub Desktop.
Pulls password for Redis authentication from Magento 2 configuration file to run `redis-cli flushall`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REDISCLI_AUTH=$(php -r ' | |
$env = require_once "app/etc/env.php"; | |
echo @$env["cache"]["frontend"]["default"]["backend_options"]["password"]; | |
') redis-cli flushall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment