Permalink
Browse files

updated deploy file to use the start script that the chef recipe defa…

…ults to
  • Loading branch information...
1 parent 24790ec commit 607cd80ff90797d55e46e93cd6461ef51afe137e @unflores unflores committed Mar 31, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 config/deploy.rb
View
@@ -22,18 +22,20 @@
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "rm /var/db/mongodb/mongod.lock" if file_exists?("/var/db/mongodb/mongod.lock") and not running?("mongod")
- run "start mongo"
+ run "/etc/init.d/mongodb start"
run "start #{application}"
end
task :stop, :roles => :app, :except => { :no_release => true } do
run "stop #{application}"
- run "stop mongo"
+ run "/etc/init.d/mongodb stop"
end
task :restart, :roles => :app, :except => { :no_release => true } do
run "restart #{application} || #{try_sudo :as => 'root'} start #{application}"
- end
+ run "/etc/init.d/mongodb restart"
+ end
+
task :check_dependencies, :roles => :app do
to_screen "Checking dependencies..."
to_screen "Mongo is not installed" unless installed? "mongo"
@@ -81,7 +83,7 @@ def to_screen msg; puts "\t===============#{msg}===============" end
export HOME="/home/#{admin_runner}"
cd #{current_path}
- exec sudo -u root sh -c "mongod"
+ exec sudo -u root sh -c "mongod --syncdelay 60 --config /etc/mongodb.conf"
end script
respawn

0 comments on commit 607cd80

Please sign in to comment.