arya/bluepill — pull request #159 by rvera (2012-11-17 12:51:41+00:00)
Title: pre_start_command hook

Based on issue #154 I created a pre_start_command so we can do stuff like:

process.pre_start_command = "rm -f #{PUMA_SOCKET_FILE}"
process.start_command = "bundle exec puma -b #{PUMA_SOCKET} -t 8:32-e #{RAILS_ENV}"

Puma is a very special case. Since it needs to be daemonized the start_command must be the puma bin or otherwise it won't work. So commands like "sh -c 'rm #{PUMA_SOCKET_FILE} && bundle exec puma -b #{PUMA_SOCKET} -t 8:32-e #{RAILS_ENV}'" don't work.

I guess this is true for all other processes that need to be daemonized and require a bit of cleanup before starting them.