require => File['/usr/local/sbin/drupal'],
}
+ # Keep themes and modules up-to-date
+ cron { "drupal-update":
+ command => "/usr/local/sbin/drupal cron-update",
+ user => root,
+ hour => "02",
+ minute => "30",
+ ensure => present,
+ }
+
# Drupal shared folder
file { "/usr/local/share/drupal":
ensure => directory,
# Process sites just once, avoiding symlinks
if echo $settings_hash | grep -q -v $hash; then
settings_hash="$settings_hash-$hash"
- if [ "$1" != "cron" ]; then
+ if [ "$1" != "cron" ] || [ "$SILENT" != "yes" ]; then
echo "Processing $drupal..."
fi
drush -l $drupal $*
exit 1
elif [ "$1" == "cron" ]; then
drupal_iterate cron
+elif [ "$1" == "cron-update" ]; then
+ SILENT="yes"
+ drupal_iterate update -y -p | grep -v -E 'Unknown|Up-to-date|Atualizado|Desconhecido'
elif [ "$1" == "deploy" ]; then
shift
drupal_deploy $*