Created
August 8, 2017 18:34
-
-
Save alexandr-parkhomenko/b6b0e799b4ddd9cb9e18acedcb76afea to your computer and use it in GitHub Desktop.
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
# Fix timezone in php | |
date.timezone=UTC | |
memory_limit=2GB | |
short_open_tag=off | |
function getCredentials() | |
{ | |
declare -A REQUIRED_CREDENTIALS | |
fields=(database_driver database_name database_user database_password) | |
for index in ${!fields[*]} | |
do | |
fieldValue=`grep -m1 -F "${fields[$index]}:" /home/alexandr/projects/dev/application/crm-enterprise/app/config/parameters.yml | tr -d "\n" | awk '{ print $2; }' | tr -d "\n"` | |
if [ -n $fieldValue] | |
then | |
REQUIRED_CREDENTIALS[${!fields[*]}]=$fieldValue | |
end | |
done | |
print getCredentials | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment