Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

be more passenger friendly (avoid useless tempering with tmp/restart.…

…txt)
  • Loading branch information...
commit 8893ffccb2ca93088e2e1624526ab76beb5eb391 1 parent f4f8ce2
Mathieu Poumeyrol authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/chef-deploy/cached_deploy.rb
View
6 lib/chef-deploy/cached_deploy.rb
@@ -127,7 +127,7 @@ def symlink(release_to_link=latest_release)
Chef::Log.info "symlinking and finishing deploy"
symlink = false
begin
- chef_run [ "chmod -R g+w #{release_to_link}",
+ chef_run [ "find #{release_to_link} ! -perm /g+w -exec chmod g+w \\{\\} \\;",
"rm -rf #{release_to_link}/log #{release_to_link}/public/system #{release_to_link}/tmp/pids",
"mkdir -p #{release_to_link}/tmp",
"ln -nfs #{shared_path}/log #{release_to_link}/log",
@@ -136,7 +136,7 @@ def symlink(release_to_link=latest_release)
"ln -nfs #{shared_path}/system #{release_to_link}/public/system",
"ln -nfs #{shared_path}/pids #{release_to_link}/tmp/pids",
"ln -nfs #{shared_path}/config/database.yml #{release_to_link}/config/database.yml",
- "chown -R #{user}:#{group} #{release_to_link}"
+ "find #{release_to_link} ! -group #{user} -o ! -user #{user} -exec chown #{user}:#{user} \\{\\} \\;"
].join(" && ")
symlink = true
@@ -261,4 +261,4 @@ def mark
def copy_exclude
@copy_exclude ||= Array(configuration.fetch(:copy_exclude, []))
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.