Skip to content

Commit

Permalink
Merge pull request #239 from PChambino/foreman_location
Browse files Browse the repository at this point in the history
Add foreman_location and foreman_sudo configs
  • Loading branch information
gabskoro committed Oct 10, 2014
2 parents f74f16b + 47f62a8 commit b031921
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/mina/foreman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@
set_default :foreman_app, lambda { application }
set_default :foreman_user, lambda { user }
set_default :foreman_log, lambda { "#{deploy_to!}/#{shared_path}/log" }
set_default :foreman_sudo, true
set_default :foreman_format, 'upstart'
set_default :foreman_location, '/etc/init'

namespace :foreman do
desc 'Export the Procfile to Ubuntu upstart scripts'
task :export do
export_cmd = "sudo bundle exec foreman export #{foreman_format} /etc/init -a #{foreman_app} -u #{foreman_user} -l #{foreman_log}"
sudo_cmd = "sudo" if foreman_sudo
export_cmd = "#{sudo_cmd} bundle exec foreman export #{foreman_format} #{foreman_location} -a #{foreman_app} -u #{foreman_user} -l #{foreman_log}"

queue %{
echo "-----> Exporting foreman procfile for #{foreman_app}"
Expand Down

0 comments on commit b031921

Please sign in to comment.