summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-17 13:08:12 +0200
committermh <mh@immerda.ch>2010-08-17 13:08:12 +0200
commit8782a2d33dca0de4b720793313029977935627ac (patch)
tree7aa3af2eff369dece10d422d3dab5befc87d7674
parent50ef8cfe98b8ebc49a6a093d0063bc10b854ae47 (diff)
set correct domain, if domain is absent, what it is most of the time
-rw-r--r--manifests/vhost/php/drupal.pp14
1 files changed, 10 insertions, 4 deletions
diff --git a/manifests/vhost/php/drupal.pp b/manifests/vhost/php/drupal.pp
index 537f912..06601f8 100644
--- a/manifests/vhost/php/drupal.pp
+++ b/manifests/vhost/php/drupal.pp
@@ -77,10 +77,16 @@ define apache::vhost::php::drupal(
}
if $manage_cron {
- file{"/etc/cron.d/drupal_cron_${name}":
- content => "0 * * * * apache wget -O - -q -t 1 http://${domain}/cron.php\n",
- owner => root, group => 0, mode => 0644;
- }
+ if $domain == 'absent' {
+ $real_domain = $name
+ } else {
+ $real_domain = $domain
+ }
+
+ file{"/etc/cron.d/drupal_cron_${name}":
+ content => "0 * * * * apache wget -O - -q -t 1 http://${real_domain}/cron.php\n",
+ owner => root, group => 0, mode => 0644;
+ }
}
# create vhost configuration file