summaryrefslogtreecommitdiff
path: root/manifests/defaultphpdirs.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
committerMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
commit0e7099174fdef951c81880b51e23342fcde86374 (patch)
tree28e99fd804674e3ac025a73a061c73f0ce6d7870 /manifests/defaultphpdirs.pp
parent3ac4d6249f50627c0827ce3812eb21d5b89ed974 (diff)
parentbf36ba5e988a7bb3f163ed0575020ef714519edc (diff)
Merge remote-tracking branch 'shared/master' into riseup
Conflicts: README
Diffstat (limited to 'manifests/defaultphpdirs.pp')
-rw-r--r--manifests/defaultphpdirs.pp35
1 files changed, 26 insertions, 9 deletions
diff --git a/manifests/defaultphpdirs.pp b/manifests/defaultphpdirs.pp
index fdbe8a5..5485241 100644
--- a/manifests/defaultphpdirs.pp
+++ b/manifests/defaultphpdirs.pp
@@ -1,14 +1,31 @@
-# manifests/defaultphpdirs.pp
-
+# setup some directories for php
class apache::defaultphpdirs {
- file{'/var/www/upload_tmp_dir':
- ensure => directory,
+ file{
+ '/var/www/upload_tmp_dir':
+ ensure => directory,
require => Package['apache'],
- owner => root, group => 0, mode => 0755;
- }
- file{'/var/www/session.save_path':
- ensure => directory,
+ owner => root,
+ group => 0,
+ mode => '0755';
+ '/var/www/session.save_path':
+ ensure => directory,
require => Package['apache'],
- owner => root, group => 0, mode => 0755;
+ owner => root,
+ group => 0,
+ mode => '0755';
+ }
+
+ if $::selinux != 'false' {
+ $seltype_rw = $::lsbmajdistrelease ? {
+ 5 => 'httpd_sys_script_rw_t',
+ default => 'httpd_sys_rw_content_t'
+ }
+ selinux::fcontext{
+ [ '/var/www/upload_tmp_dir/.+(/.*)?',
+ '/var/www/session.save_path/.+(/.*)?' ]:
+ require => Package['apache'],
+ setype => $seltype_rw,
+ before => File['/var/www/upload_tmp_dir','/var/www/session.save_path'];
+ }
}
}