Skip to content

Instantly share code, notes, and snippets.

@alexandr-parkhomenko
Created August 8, 2017 18:34
Show Gist options
  • Save alexandr-parkhomenko/b6b0e799b4ddd9cb9e18acedcb76afea to your computer and use it in GitHub Desktop.
Save alexandr-parkhomenko/b6b0e799b4ddd9cb9e18acedcb76afea to your computer and use it in GitHub Desktop.
# 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