summaryrefslogtreecommitdiff
path: root/manifests/vhost/php
diff options
context:
space:
mode:
authorAndreas <andreas@immerda.ch>2009-11-18 19:18:30 +0100
committerAndreas <andreas@immerda.ch>2009-11-18 19:18:30 +0100
commite85ffc952066c14b115b73ec069e02d782c035b4 (patch)
tree242187c52ab4a822a96443beb4a24008719eb9dd /manifests/vhost/php
parentf40fc49735c2fb2fcc5a4c76f16dddeec1bdfc2d (diff)
create php_safe_mode_exec_bin_dir in standard.pp, not earlier; phpdirs not used
Diffstat (limited to 'manifests/vhost/php')
-rw-r--r--manifests/vhost/php/standard.pp20
-rw-r--r--manifests/vhost/php/webapp.pp13
2 files changed, 17 insertions, 16 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 6efba2a..8a82eb8 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -39,13 +39,11 @@ define apache::vhost::php::standard(
$vhost_destination = 'absent',
$htpasswd_file = 'absent',
$htpasswd_path = 'absent',
- $php_safe_mode_exec_bins = 'absent',
- $php_safe_mode_exec_bin_dir = 'absent'
+ $php_safe_mode_exec_bins = 'absent'
){
::apache::vhost::phpdirs{"${name}":
ensure => $ensure,
- php_safe_mode_exec_bin_dir => $php_safe_mode_exec_bin_dir,
php_upload_tmp_dir => $php_upload_tmp_dir,
php_session_save_path => $php_session_save_path,
documentroot_owner => $documentroot_owner,
@@ -55,7 +53,15 @@ define apache::vhost::php::standard(
run_uid => $run_uid,
}
- if $php_safe_mode_exec_bins != 'absent' {
+ if $php_safe_mode_exec_bins and ($php_safe_mode_exec_bins != 'absent') {
+ $php_safe_mode_exec_bin_dir = $path ? {
+ 'absent' => $operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}/bin",
+ default => "/var/www/vhosts/${name}/bin"
+ },
+ default => "${path}/bin"
+ }
+
file{$php_safe_mode_exec_bin_dir:
ensure => directory,
source => "puppet://$server/modules/common/empty",
@@ -67,6 +73,12 @@ define apache::vhost::php::standard(
apache::vhost::php::safe_mode_bin{ $php_safe_mode_exec_bins_subst:
path => $php_safe_mode_exec_bin_dir
}
+ }else{
+ file{$php_safe_mode_exec_bin_dir:
+ ensure => absent,
+ recurse => true
+ force => true
+ }
}
if $php_use_smarty {
diff --git a/manifests/vhost/php/webapp.pp b/manifests/vhost/php/webapp.pp
index 4edc069..71f78a9 100644
--- a/manifests/vhost/php/webapp.pp
+++ b/manifests/vhost/php/webapp.pp
@@ -71,16 +71,6 @@ define apache::vhost::php::webapp(
}
}
- if $php_safe_mode_exec_bins and ($php_safe_mode_exec_bins != 'absent') {
- $php_safe_mode_exec_bin_dir = $path ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/var/www/htdocs/${name}/bin",
- default => "/var/www/vhosts/${name}/bin"
- },
- default => "${path}/bin"
- }
- }
-
# create vhost configuration file
::apache::vhost::php::standard{$name:
ensure => $ensure,
@@ -113,8 +103,7 @@ define apache::vhost::php::webapp(
vhost_destination => $vhost_destination,
htpasswd_file => $htpasswd_file,
htpasswd_path => $htpasswd_path,
- php_safe_mode_exec_bins => $php_safe_mode_exec_bins,
- php_safe_mode_exec_bin_dir => $php_safe_mode_exec_bin_dir,
+ php_safe_mode_exec_bins => $php_safe_mode_exec_bins
}
}