]> gitweb.fluxo.info Git - puppet-wordpress.git/commitdiff
Check for previous installation
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 17:37:43 +0000 (15:37 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 17:37:43 +0000 (15:37 -0200)
templates/wordpress.sh.erb

index 33d473c9b13ab0b554df3eae2e21b3d97cf7f3c9..60a15e99409ae9c0349f995c39ba9f4e15f5ac59 100644 (file)
@@ -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