diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-01-06 22:57:40 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-01-06 22:57:40 -0200 |
commit | e7cb458bf494cda625ec1600e859a3eadea65575 (patch) | |
tree | 9d0b1f53089d0062b176c97b70bb9734e39e67b2 | |
parent | a1f92c75e44453e7a85c2de7609bf80e1ed92b8c (diff) | |
download | puppet-ikiwiki-e7cb458bf494cda625ec1600e859a3eadea65575.tar.gz puppet-ikiwiki-e7cb458bf494cda625ec1600e859a3eadea65575.tar.bz2 |
Misc fixes
-rw-r--r-- | manifests/init.pp | 26 | ||||
-rw-r--r-- | templates/deploy.sh.erb | 1 |
2 files changed, 20 insertions, 7 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 1cef3e6..35b7b8d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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"], + } } } } diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb index e98b57c..19aa514 100644 --- a/templates/deploy.sh.erb +++ b/templates/deploy.sh.erb @@ -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. |