Sha256: 9b26583788a6077c7d5b9f30526a8641be7413d01e643c96d230cdb84eade1a3

Contents?: true

Size: 899 Bytes

Versions: 2

Compression:

Stored size: 899 Bytes

Contents

namespace :backgroundrb do
  
  namespace :centos do
    
    desc <<-DESC
    Setup backgroundrb for application.
    
    "Source":#{link_to_source(__FILE__)}
    DESC
    task_arg(:backgroundrb_bin_path, "Path to backgroundrb bin", :default => Proc.new{"#{current_path}/script/backgroundrb -e production start"}, :default_desc => "\#{current_path}/script/backgroundrb -e production start")
    task_arg(:backgroundrb_pid_path, "Path to backgroundrb pid file", :default => Proc.new{"#{shared_path}/pids/backgroundrb.pid"}, :default_desc => "\#{shared_path}/pids/backgroundrb.pid")    
    task :setup do       
      # Install initscript      
      utils.install_template("backgroundrb/backgroundrb.initd.centos.erb", "/etc/init.d/backgroundrb_#{application}")

      # Enable service
      run_via "/sbin/chkconfig --level 345 backgroundrb_#{application} on"    
      
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
calas-capitate-0.3.6 lib/recipes/centos/backgroundrb.rb
capitate-0.3.6 lib/recipes/centos/backgroundrb.rb