diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-12-19 18:02:28 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-12-19 18:02:28 -0200 |
commit | dc3277139f07a0c552b4f4713ae59bed05b26a72 (patch) | |
tree | 01af7570946a860cfc74983fc80c834f37421903 /templates/wordpress.sh.erb | |
parent | d3f596a32d19fa5abc701e9f490875b4427b48bc (diff) | |
download | puppet-wordpress-dc3277139f07a0c552b4f4713ae59bed05b26a72.tar.gz puppet-wordpress-dc3277139f07a0c552b4f4713ae59bed05b26a72.tar.bz2 |
Change symlink to point to the new location
Diffstat (limited to 'templates/wordpress.sh.erb')
-rw-r--r-- | templates/wordpress.sh.erb | 7 |
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`" |