Created
May 22, 2020 15:57
-
-
Save sjb9774/4f8aecdcbc9a4908fa2c9cd1b5f88033 to your computer and use it in GitHub Desktop.
This file contains 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
# add to ~/.bashrc and run . ~/.bashrc or open a new terminal window | |
function m2config () { | |
ssh -C $1 'php -d include_path='\''/var/www/stage/current:/var/www/html/current:/var/www/prod/current'\'' -r '\''$c = include "app/etc/env.php"; echo json_encode($c);'\''' | jq -r .$2 | |
} | |
# usage | |
m2config www-stage@stage.mysite.com db.connection.default.username # returns db username from env.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment