Permalink
Browse files

Foreman now needs log folder to be owned by the application user.

When exporting, the latest foreman now attempts to chown the log folder to the application user.  As we're running export as a normal user (not sudo), this will fail if the folder isn't already owned by that user.
  • Loading branch information...
tomafro committed Jul 25, 2012
1 parent 4700f37 commit 1c963617b6141e2335a826e1a882c078b094cb23
Showing with 2 additions and 0 deletions.
  1. +1 −0 features/support/project.rb
  2. +1 −0 lib/recap/tasks/foreman.rb
@@ -118,6 +118,7 @@ def initialize(options = {})
FileUtils.rm_rf repository_path
git 'init'
write_and_commit_file 'Capfile', Capfile.new(self, options[:capfile] || {})
+ write_and_commit_file 'log/.gitkeep'
end
def name
@@ -35,6 +35,7 @@ module Recap::Tasks::Foreman
desc 'Export foreman configuration'
task :default do
if deployed_file_exists?(procfile)
+ sudo "chown #{application_user}: #{deploy_to}/log"
as_app foreman_export_command
sudo "rm -f #{foreman_export_location}/#{application}*"
sudo "cp #{foreman_tmp_location}/* #{foreman_export_location}"

0 comments on commit 1c96361

Please sign in to comment.