Sha256: 6c69f46c45f126567d34e36f152758ad5672bf5c06451583fb6dfb5db977239b

Contents?: true

Size: 718 Bytes

Versions: 5

Compression:

Stored size: 718 Bytes

Contents

#!/usr/bin/env ruby

require 'thin'

argv = ARGV
argv << ["-p", "3000"] unless ARGV.include?("-p")

# Set RACK_ENV based on command line parameters
# so it's available for Sinatra application
if ARGV.include?("-e")
  ENV['RACK_ENV'] = ARGV[ ARGV.index('-e') + 1 ]
else
  argv << ["-e", "production"]
  ENV['RACK_ENV'] = "production"
end

# WpaCliWeb daemon command line interface script.
# Run wpa_cli_web -h to get more usage.
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'wpa_cli_web.rb'))
rackup_file = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'wpa_cli_web', 'config.ru'))

argv << ["-R", rackup_file] unless ARGV.include?("-R")
Thin::Runner.new(argv.flatten).run!

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wpa_cli_web-0.0.17 bin/wpa_cli_web
wpa_cli_web-0.0.15 bin/wpa_cli_web
wpa_cli_web-0.0.14 bin/wpa_cli_web
wpa_cli_web-0.0.13 bin/wpa_cli_web
wpa_cli_web-0.0.12 bin/wpa_cli_web