Sha256: 8b7bb2698f2d7a26146496a19eb09b6f477a5c250f6c074c7e88ceb0e3c37044

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

require 'erb'

Capistrano::Configuration.instance.load do

##########################################################################
# shoot_star for CHAT system

namespace :shooting_star do

  desc "start shoot_star server"
  task :start do
    run "cd #{latest_release} && sudo nohup shooting_star start -d"
  end

  desc "stop shoot_star server"
  task :stop do
    run "cd #{latest_release} && sudo shooting_star stop"
  end

  desc "restart shoot_star server"
  task :restart do
    stop
    start
  end

  desc "Create shooting_star yaml in shared path"
  task :default do
    shoot_config = ERB.new <<-EOF
    server:
      host: 0.0.0.0
      port: #{shoot_server_port}
    shooter:
      uri: druby://0.0.0.0:#{shoot_drb_port}
    EOF

    sudo "mkdir -p #{shared_path}/config"
    sudo "chown -R #{user}:#{mongrel_group} #{deploy_to}/"
    sudo "chmod 774 -R #{shared_path}/config"
    put shoot_config.result, "#{shared_path}/config/shooting_star.yml"
  end

  desc "Make symlink for shooting star yaml"
  task :symlink do
    run "ln -nfs #{shared_path}/config/shooting_star.yml #{release_path}/config/shooting_star.yml"
  end
end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gramos-robbie-0.0.1 lib/robbie/recipes/shooting_star.rb
gramos-robbie-0.0.2 lib/robbie/recipes/shooting_star.rb