Sha256: e64b114995623a0962f81b21ad4ef6b83cd827578ba00d7bd14ae208cae202b0

Contents?: true

Size: 711 Bytes

Versions: 195

Compression:

Stored size: 711 Bytes

Contents

<%
  @path = "/etc/init.d/cruise"
  @perms = 0755
%>#!/usr/bin/env ruby

require "fileutils"
include FileUtils

require "rubygems"

begin
  gem 'mongrel'
rescue => e
  puts "Error: daemon mode of CC.rb requires mongrel installed"
  exit 1
end

def cruise_path
  '<%= rubber_env.cruise_dir %>'
end

command = ARGV.shift

case command
when 'start'
  cd cruise_path
  system "./cruise start -d"
  exit 0
when 'stop'
  system "mongrel_rails stop -P #{cruise_path}/tmp/pids/mongrel.pid"
  Dir["#{cruise_path}/tmp/pids/builders/*.pid"].each do |pid_file|
    pid = File.open(pid_file){|f| f.read }
    system "kill -9 #{pid}"
    rm pid_file
  end
  exit 0
else
  p "Usage: /etc/init.d/cruise start|stop"
  exit 1
end

Version data entries

195 entries across 155 versions & 7 rubygems

Version Path
rubber-2.0.0.pre8 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre7 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre6 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre5 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre4 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre3 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre2 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.0.0.pre1 templates/cruise/config/rubber/role/cruise/cruise
rubber-1.15.0 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.15.0 lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.14.1 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.14.1 lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.14.0 lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.14.0 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.13.2 lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.13.2 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.13.1 lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
rubber-1.13.1 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
axtro-rubber-1.2.3 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
axtro-rubber-1.2.2 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise