Skip to content

Instantly share code, notes, and snippets.

@wallace
Created April 2, 2009 18:32
Show Gist options
  • Select an option

  • Save wallace/89343 to your computer and use it in GitHub Desktop.

Select an option

Save wallace/89343 to your computer and use it in GitHub Desktop.
167 task :start do
168 run "sudo /etc/init.d/apache2 start"
169 backgroundrb.start
170 end
171
172 task :stop do
173 run "sudo /etc/init.d/apache2 stop"
174 backgroundrb.stop
175 end
176
...
197 namespace :backgroundrb do
198 task :restart do
199 begin stop; rescue; end #this catches the bdrb error where a PID file doesn't exist
200 start
201 end
202
203 task :stop do
204 run "cd #{deploy_to}/current && #{deploy_to}/current/script/backgroundrb -e #{rails_env} stop"
205 end
206
207 task :start do
208 run "cd #{deploy_to}/current && #{deploy_to}/current/script/backgroundrb -e #{rails_env} start"
209 end
210 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment