summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-19 18:02:28 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-19 18:02:28 -0200
commitdc3277139f07a0c552b4f4713ae59bed05b26a72 (patch)
tree01af7570946a860cfc74983fc80c834f37421903
parentd3f596a32d19fa5abc701e9f490875b4427b48bc (diff)
downloadpuppet-wordpress-dc3277139f07a0c552b4f4713ae59bed05b26a72.tar.gz
puppet-wordpress-dc3277139f07a0c552b4f4713ae59bed05b26a72.tar.bz2
Change symlink to point to the new location
-rw-r--r--templates/wordpress.sh.erb7
1 files changed, 6 insertions, 1 deletions
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`"