From: Silvio Rhatto Date: Wed, 7 Dec 2011 13:28:52 +0000 (-0200) Subject: Iterate just over sites with settings X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c5b0e339d9a3a0b6b55bd49fb8edd0556eab8d6e;p=puppet-drupal.git Iterate just over sites with settings --- diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb index 87253c2..77bc472 100644 --- a/templates/drupal.sh.erb +++ b/templates/drupal.sh.erb @@ -64,12 +64,14 @@ function drupal_iterate { # Issue updates for drupal in $drupals; do - # Ignore symlinks so sites are updated just once - if [ ! -h "$drupal" ] || [ ! -h "`readlink $drupal`" ]; then - if [ "$1" != "cron" ]; then - echo "Processing $drupal..." + if [ -e "$drupal/settings.php" ]; then + # Ignore symlinks so sites are updated just once + if [ ! -h "$drupal" ] || [ ! -h "`readlink $drupal`" ]; then + if [ "$1" != "cron" ]; then + echo "Processing $drupal..." + fi + drush -l $drupal $* fi - drush -l $drupal $* fi done