Sha256: 8ebc2fb8fb98d812f5a4066e4e4b5d2ed4aed64f769cbde1c269a2d14fe29859

Contents?: true

Size: 694 Bytes

Versions: 15

Compression:

Stored size: 694 Bytes

Contents

module Freyr
  class CLI < Thor
    
    desc 'update_pid [SERVICE=dirname]', 'Update pid from proc_match (good to use if service already launched)'
    def update_pid(name=nil)
      services = get_from_name(name)
      if s = services.first
        if pid = s.command.update_pid
          say "Updated pid for "<< set_color(s.name,:blue) << ' to ' << set_color(pid,:red)
        elsif s.proc_match
          say "Couldn't find pid for process matcher #{s.proc_match.inspect}", :red
        else
          say "Service #{s.name} doesn't have a value for proc_match set.", :red
        end
      else
        say "Couldn't find service with name #{name}.", :red
      end
    end
    
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
freyr-0.4.2 lib/freyr/cli/management.rb
freyr-0.4.1 lib/freyr/cli/management.rb
freyr-0.4.0 lib/freyr/cli/management.rb
freyr-0.3.13 lib/freyr/cli/management.rb
freyr-0.3.12 lib/freyr/cli/management.rb
freyr-0.3.11 lib/freyr/cli/management.rb
freyr-0.3.9 lib/freyr/cli/management.rb
freyr-0.3.8 lib/freyr/cli/management.rb
freyr-0.3.7 lib/freyr/cli/management.rb
freyr-0.3.6 lib/freyr/cli/management.rb
freyr-0.3.5 lib/freyr/cli/management.rb
freyr-0.3.4 lib/freyr/cli/management.rb
freyr-0.3.3 lib/freyr/cli/management.rb
freyr-0.3.2 lib/freyr/cli/management.rb
freyr-0.3.0 lib/freyr/cli/management.rb