Permalink
Browse files

Creating the shared database.yml with 600 permissions

  • Loading branch information...
1 parent ed764df commit 66a91b23ba8c4811d8515f62fc4637779d02744a @amfranz committed Nov 30, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/database_yml/capistrano.rb
@@ -62,7 +62,12 @@
run "mkdir -p #{shared_path}/db"
run "mkdir -p #{shared_path}/config"
put config.result(binding), "#{shared_path}/config/database.yml.example"
- run "test -e #{shared_path}/config/database.yml || cp -f #{shared_path}/config/database.yml.example #{shared_path}/config/database.yml"
+
+ run <<-CMD
+ test -e #{shared_path}/config/database.yml || {
+ cp -f #{shared_path}/config/database.yml.example #{shared_path}/config/database.yml &&
+ chmod 600 #{shared_path}/config/database.yml; }
+ CMD
end
desc <<-DESC

0 comments on commit 66a91b2

Please sign in to comment.