]> gitweb.fluxo.info Git - puppet-ikiwiki.git/commitdiff
Misc fixes
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jan 2010 00:57:40 +0000 (22:57 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jan 2010 00:57:40 +0000 (22:57 -0200)
manifests/init.pp
templates/deploy.sh.erb

index 1cef3e671e8cd93ba48616a39c8514f292a06410..35b7b8d76e96831f494daf344c37ad295803aa47 100644 (file)
@@ -32,15 +32,27 @@ class ikiwiki {
         }
     
         exec { "/usr/local/sbin/ikiwiki-deploy $name":
-          unless => "/bin/sh -c [ -f '${apache_sites_folder}/${name}_src/index.mdw' ]",
+          unless  => "/bin/sh -c [ -f '${apache_sites_folder}/${name}_src/index.mdw' ]",
         }
     
-        file { [ "${apache_sites_folder}/${name}_src" ]:
-          ensure  => directory,
-          owner   => gitosis,
-          group   => gitosis,
-          recurse => true,
-          notify  => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+        if !defined(File["${apache_sites_folder}/${name}_src"]) {
+          file { "${apache_sites_folder}/${name}_src":
+            ensure  => directory,
+            owner   => gitosis,
+            group   => gitosis,
+            recurse => true,
+            notify  => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+          }
+        }
+
+        if !defined(File["${apache_sites_folder}/${name}"]) {
+          file { "${apache_sites_folder}/${name}":
+            ensure  => directory,
+            owner   => gitosis,
+            group   => gitosis,
+            recurse => true,
+            notify  => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+          }
         }
       }
     }
index e98b57c8e00e0bb2557b9a738b7d07a08813f953..19aa514b1dd95ee6ff8518b7ec3e1444a5be8ff1 100644 (file)
@@ -13,6 +13,7 @@ if [ ! -e "$CONF/$NAME" ]; then
   echo "No config file for $NAME"
 fi
 
+mkdir -p $SITE/ikiwiki_src/
 echo > $SITE/ikiwiki_src/index.mdw <<EOF
 Welcome to your new wiki.