From dc3277139f07a0c552b4f4713ae59bed05b26a72 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 19 Dec 2011 18:02:28 -0200 Subject: Change symlink to point to the new location --- templates/wordpress.sh.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/wordpress.sh.erb b/templates/wordpress.sh.erb index 6ef3594..60918c5 100644 --- a/templates/wordpress.sh.erb +++ b/templates/wordpress.sh.erb @@ -97,7 +97,12 @@ function wordpress_upgrade { chown -R root.root wordpress-$new/wp-content/{plugins,themes} # Change symlink to point to the new location - #cd $BASE ; rm -f blogs && ln -s wordpress-$new blogs + if [ -h "site" ]; then + link="`readlink site`" + if [ "`basename $link`" == "wordpress-$old" ]; then + rm site && ln -s wordpress-$new site + fi + fi # Done echo "Audit: `du -hs wordpress-$old`" -- cgit v1.2.3