Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deepakaryan1988/6f20624d47db5fc26859067d418de317 to your computer and use it in GitHub Desktop.
Save deepakaryan1988/6f20624d47db5fc26859067d418de317 to your computer and use it in GitHub Desktop.
Bash script to loop through all the different platforms/sites on an aegir deployment, and performs drush commands against them.
#!/bin/bash
for dir in /var/aegir/platforms/*
do
cd "$dir/sites"
drush @sites -y ev "variable_set('smtp_host', 'your_host');"
drush @sites -y ev "variable_set('smtp_username', 'your_user');"
drush @sites -y ev "variable_set('smtp_password', 'your_pass');"
drush @sites -y ev "variable_set('smtp_port', 'your_port');"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment