aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-07 11:28:52 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-07 11:28:52 -0200
commitc5b0e339d9a3a0b6b55bd49fb8edd0556eab8d6e (patch)
tree8219670dc8b90579b6ebdada4091d30797165061
parenta8384877bf0547e7c2d959a5b09a0fda6d8d92ab (diff)
downloadpuppet-drupal-c5b0e339d9a3a0b6b55bd49fb8edd0556eab8d6e.tar.gz
puppet-drupal-c5b0e339d9a3a0b6b55bd49fb8edd0556eab8d6e.tar.bz2
Iterate just over sites with settings
-rw-r--r--templates/drupal.sh.erb12
1 files changed, 7 insertions, 5 deletions
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