Sha256: e280dc6417b2c3c892add8cda62a548778eeb72cd3f055bb509e0ca19a39f8a0

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

namespace :backgroundrb do
  
  desc <<-DESC
  Create backgroundrb.yml configuration.
  
  For pid path support, change backgroundrb script pid_file line to:
  
    pid_file = "\#{CONFIG_FILE[:backgroundrb][:pid_file]}"
  
  *backgroundrb_host*: Backgroundrb host. _Defaults to 0.0.0.0_\n
  *backgroundrb_port*: Backgroundrb port. _Defaults to 11006_\n
  *backgroundrb_yml_template*: Backgroundrb yml template. _Defaults to @backgroundrb/backgroundrb.yml.erb@ in this gem.\n
  DESC
  task :setup do
    fetch_or_default(:backgroundrb_host, "0.0.0.0")
    fetch_or_default(:backgroundrb_port, 11006)
    fetch_or_default(:backgroundrb_pid_path, "#{shared_path}/pids/backgroundrb.pid")
    fetch_or_default(:backgroundrb_yml_template, "backgroundrb/backgroundrb.yml.erb")
    
    utils.install_template(backgroundrb_yml_template, "#{shared_path}/config/backgroundrb.yml")    
  end
  
  desc <<-DESC
  Symlink backgroundrb config into release path.  
  DESC
  task :update_code do
    run "ln -nfs #{shared_path}/config/backgroundrb.yml #{release_path}/config/backgroundrb.yml" 
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capitate-0.2.11 lib/recipes/backgroundrb.rb