# Check for existing installations
function drupal_check_existing {
if [ -e "$BASE/drupal-$1" ]; then
- echo "Folder $BASE/drupal-$1 already exists, skipping"
+ if [ "$SILENT" != "yes" ]; then
+ echo "Folder $BASE/drupal-$1 already exists, skipping"
+ fi
exit
fi
}
# Check for non existing installations
function drupal_check_not_existing {
if [ ! -e "$BASE/drupal-$1" ]; then
- echo "Folder $BASE/drupal-$1 does not exist, skipping"
+ if [ "$SILENT" != "yes" ]; then
+ echo "Folder $BASE/drupal-$1 does not exist, skipping"
+ fi
exit 1
fi
}
class drupal::autoupgrade {
# Keep 8.x codebase updated
cron { "drupal-autoupgrade-8.x":
- command => "/usr/local/bin/drupal upgrade 8",
- user => root,
+ command => "/usr/local/bin/drupal upgrade 8",
+ user => root,
# Run once a week after security releases (usually on Wednesdays)
- weekday => 5,
- hour => "01",
- minute => "30",
- ensure => present,
- require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
+ weekday => 5,
+ hour => "01",
+ minute => "30",
+ environment => [ 'SILENT=yes' ],
+ ensure => present,
+ require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
}
# Keep 7.x codebase updated
cron { "drupal-autoupgrade-7.x":
- command => "/usr/local/bin/drupal upgrade 7",
- user => root,
+ command => "/usr/local/bin/drupal upgrade 7",
+ user => root,
# Run once a week after security releases (usually on Wednesdays)
- weekday => 5,
- hour => "01",
- minute => "30",
- ensure => present,
- require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
+ weekday => 5,
+ hour => "01",
+ minute => "30",
+ environment => [ 'SILENT=yes' ],
+ ensure => present,
+ require => [ File['/usr/local/bin/drupal'], User['drupal'] ],
}
}