From 34ce4a513dc9f6db315bbe71f6a66230abb0273e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 19 Dec 2011 15:37:43 -0200 Subject: Check for previous installation --- templates/wordpress.sh.erb | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3