From: Silvio Rhatto Date: Mon, 19 Dec 2011 17:37:43 +0000 (-0200) Subject: Check for previous installation X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=34ce4a513dc9f6db315bbe71f6a66230abb0273e;p=puppet-wordpress.git Check for previous installation --- 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