Sha256: ffc7d4c0b6b0ca127f6873543bcc024402e6bdc08316bf6c19fc82612b3dce8d

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

#!/usr/bin/env ruby

if ARGV.size == 0
  puts '
Usage: controller [ boot | quit ]
       controller [ start | status | stop | restart | log ] [worker]

Example:
  % controller boot    # start bluepilld and jobs
  % controller status  # check on status of jobs
  % controller log dor_accessionWF_descriptive-metadata # view log for worker
  % controller stop    # stop jobs
  % controller quit    # stop bluepilld
'
  exit -1
end

ENV['ROBOT_ENVIRONMENT'] ||= 'development'

cmd = "bluepill --no-privileged"
cmd << " --base-dir #{ENV['BLUEPILL_BASE_DIR'] || File.expand_path('run/bluepill')}"
cmd << " --logfile #{ENV['BLUEPILL_LOGFILE'] || File.expand_path('log/bluepill.log')}"

if ARGV[0] == 'boot' 
  system "#{cmd} load config/environments/bluepill_#{ENV['ROBOT_ENVIRONMENT']}.rb"
else
  system "#{cmd} #{ARGV.join(' ')}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
robot-controller-0.2.0 bin/controller