Sha256: 2a59404b5ed1e25eb9919ac204af61759c927431eac576461adbd8bb1f9c4522

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

#!/usr/bin/env ruby
require 'daemons'
require 'dotenv'
require 'optparse'

`mkdir -p ~/optimus_runner/logs`
`mkdir -p ~/optimus_runner/pids`
options = {
    :app_name           => "optimus-runner",
    :ARGV               => ARGV,
    :dir_mode           => :normal,
    :dir                => "#{File.expand_path('~')}/optimus_runner/pids",
    :multiple           => true,
    :log_output         => true,
    :pid_delimiter      => '.n',
    :backtrace          => true,
    :monitor            => true,
    :log_dir            => "#{File.expand_path('~')}/optimus_runner/logs",
    :logfilename        => 'optimus-runner.log'
}

ENV["ANDROID"]="true"
ENV["IOS"]="true"
optparser = OptionParser.new do |parser|
      parser.on('-e=FILE','--env=FILE', "Optimus Cloud Environment file") do |file|
        Dotenv.load(file)
      end
      parser.on('-a','--android-only',"Create sessions for android") do 
        ENV["IOS"]="false"
        p "running android"
      end
      parser.on('-i','--ios-only',"Create sessions for iOS") do 
        ENV["ANDROID"]="false"
        p "running ios"
      end
    end
optparser.parse!(ARGV)
Daemons.run(File.join(File.dirname(__FILE__),'optimus_runner_manager'), options)
#Daemons.run('exe/optimus_runner_manager', options)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
optimus-runner-1.2.0 exe/optimus-runner
optimus-runner-1.1.4 exe/optimus-runner
optimus-runner-1.1.3 exe/optimus-runner