Bluepill.application("nginx", :log_file => "<%= @log_dir %>/bluepill-nginx.log") do |app| app.process("nginx") do |process| process.pid_file = "<%= @pid %>" process.working_dir = "<%= @working_dir %>" process.start_command = "<%= @src_binary %> -c <%= @nginx_dir %>/nginx.conf" process.stop_command = "kill -QUIT {{PID}}" process.restart_command = "kill -HUP {{PID}}" process.daemonize = true process.stdout = process.stderr = "<%= @log_dir %>/nginx.log" process.monitor_children do |child_process| child_process.stop_command = "kill -QUIT {{PID}}" end end end