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-3.2.2 templates/cruise/config/rubber/role/cruise/cruise
rubber-3.2.1 templates/cruise/config/rubber/role/cruise/cruise
rubber-3.2.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-3.1.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-3.0.1 templates/cruise/config/rubber/role/cruise/cruise
rubber-3.0.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.16.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.15.2 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.15.1 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.15.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.14.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.13.1 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.13.0 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.12.2 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.12.1 templates/cruise/config/rubber/role/cruise/cruise
rubber-2.12.0 templates/cruise/config/rubber/role/cruise/cruise
sml-rubber-0.9.1 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
sml-rubber-0.9.10 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
sml-rubber-0.9.11 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise
sml-rubber-0.9.13 generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise