diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-01-25 22:05:23 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-01-25 22:05:23 -0200 |
commit | 5f5aa68b1702d90063c5819b2db757428a10d345 (patch) | |
tree | b14d719f906f1142e2d5da5bf43f3e6a5153201c /manifests | |
parent | 25c9378cd03d6c8324f80959418049de1ce392ab (diff) | |
download | puppet-ikiwiki-5f5aa68b1702d90063c5819b2db757428a10d345.tar.gz puppet-ikiwiki-5f5aa68b1702d90063c5819b2db757428a10d345.tar.bz2 |
Trying to fix permission issue
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 8a0048e..7997903 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,6 +15,14 @@ class ikiwiki { mode => 755, } + file { "/usr/local/sbin/ikiwiki-refresh": + ensure => present, + content => template('ikiwiki/refresh.sh.erb'), + owner => root, + group => root, + mode => 755, + } + define instance($base_url = false, $ensure = 'present', $description = false, $adminuser = 'yourname', $adminemail = 'me@example.org', $instance = 'ikiwiki') { @@ -35,13 +43,14 @@ class ikiwiki { owner => root, group => root, mode => 644, - notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"], + notify => Exec["ikiwiki_refresh_${name}"], } case $ensure { 'present': { - exec { "ikiwiki --setup /etc/ikiwiki/$name.setup": - user => www-data, + exec { "ikiwiki_refresh_${name}": + command => "/usr/local/sbin/ikiwiki-refresh $name $instance", + user => root, refreshonly => true, } @@ -56,7 +65,7 @@ class ikiwiki { owner => www-data, group => www-data, recurse => true, - notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"], + notify => Exec["ikiwiki_refresh_${name}"], require => File["${apache_sites_folder}/${name}"], } } @@ -83,14 +92,17 @@ class ikiwiki { # gitosis can do a setuid to it and write to ikiwiki # folders without messing the permission scheme. # + # The same is valid for the cgi. + # # See http://ikiwiki.info/rcs/git/ # http://ikiwiki.info/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid/ # - file { "/var/git/repositories/${name}.git/hooks/post-update": + file { [ "/var/git/repositories/${name}.git/hooks/post-update", + "${apache_sites_folder}/${name}/${instance}/ikiwiki.cgi" ]: ensure => present, owner => www-data, group => gitosis, - mode => 4550, + mode => 6550, } } } |