]> gitweb.fluxo.info Git - puppet-wordpress.git/commitdiff
Change symlink to point to the new location
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 20:02:28 +0000 (18:02 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2011 20:02:28 +0000 (18:02 -0200)
templates/wordpress.sh.erb

index 6ef35948b029ea18b6fdd3d14201b032e8a39a7e..60918c575d1fa6ff09d65a030ee0088124d26e9f 100644 (file)
@@ -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`"