aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp24
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,
}
}
}