From: Silvio Rhatto Date: Mon, 19 Dec 2011 20:02:28 +0000 (-0200) Subject: Change symlink to point to the new location X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=dc3277139f07a0c552b4f4713ae59bed05b26a72;p=puppet-wordpress.git Change symlink to point to the new location --- 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`"