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