summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-19 15:37:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-19 15:37:43 -0200
commit34ce4a513dc9f6db315bbe71f6a66230abb0273e (patch)
tree612d904e59ef5edf61c7857db61381017a3b77af
parent70704ff97fa8e6fea87cd9ab463af98c2db671e0 (diff)
downloadpuppet-wordpress-34ce4a513dc9f6db315bbe71f6a66230abb0273e.tar.gz
puppet-wordpress-34ce4a513dc9f6db315bbe71f6a66230abb0273e.tar.bz2
Check for previous installation
-rw-r--r--templates/wordpress.sh.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/wordpress.sh.erb b/templates/wordpress.sh.erb
index 33d473c..60a15e9 100644
--- a/templates/wordpress.sh.erb
+++ b/templates/wordpress.sh.erb
@@ -61,6 +61,12 @@ function wordpress_upgrade {
wordpress_check_existing $new
cd $BASE
+
+ if [ ! -d "wordpress-$old" ]; then
+ echo "Installation not found: wordpress-$old"
+ exit
+ fi
+
cp -a wordpress-$old wordpress-$old.backup
# Deploy a fresh wordpress tree