Sha256: 6f5a3517b147f4e86afc79badcdaaebb4959cd985a2a3d4b3ae651cda9ece64e

Contents?: true

Size: 1003 Bytes

Versions: 3

Compression:

Stored size: 1003 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "poolparty"
require "poolpartycl"

o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
  opts.on('-n name', '--name name', 'Host name')    { |h| optioner.hostname h }
end

o.loaded_clouds.each do |cloud|
  
  with_cloud(cloud) do
        
    # ruby /var/lib/gems/1.8/bin/server-start-client    
    already_running = %x[ps aux | grep beam | grep -v grep | grep client]
    if already_running.chomp.empty?
      
      boot_file = "#{Messenger.append_dir}/pm_client_rel-0.1"

      Kernel.system "cd #{Messenger.append_dir} && rake build_boot_scripts"  unless ::File.file?("#{boot_file}.boot") || testing    
      command = Messenger.erl_command("client", "-setcookie #{generate_unique_cookie_string} -boot #{boot_file} #{noshell ? "" : "-detached -heart -noshell"}", 7049, 7050)
      vputs "Running #{command}"
      
      Kernel.system "export HOME=/root && #{command}" unless testing
    end
  end  
  
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
auser-poolparty-0.2.84 bin/server-start-client
auser-poolparty-0.2.85 bin/server-start-client
poolparty-0.2.84 bin/server-start-client