Sha256: b6e4e6de8ff216bfef05ec5b912c6309ddd22725554f2a2b26da00209dda287f

Contents?: true

Size: 1.07 KB

Versions: 11

Compression:

Stored size: 1.07 KB

Contents

Standup.script :node do
  def run
    raise "Please call resque install instead"
  end

  def install_from_resque
    in_dir "#{scripts.webapp.app_path}" do
      sudo "git clone git://github.com/defunkt/resque.git"
    end

    in_dir "#{scripts.webapp.app_path}/resque" do
      sudo "rake redis:install"
    end

    sudo "rm -fr #{scripts.webapp.app_path}/resque"


    upload script_file('redis.conf'),
           :to => '/etc/redis.conf',
           :sudo => true
    with_processed_file script_file('redis.conf') do |file|
      upload file, :to => '/etc/redis.conf',
             :sudo => true
    end
    upload script_file('redis-server'),
           :to => '/etc/init.d/redis-server',
           :sudo => true

    sudo 'chmod +x /etc/init.d/redis-server'
    sudo '/usr/sbin/update-rc.d -f redis-server defaults'
    sudo 'service redis-server stop'
    sudo 'service redis-server start'

    with_processed_file script_file('redis_monit.conf') do |file|
      scripts.monit.add_watch file
    end

    restart
  end

  def restart
    scripts.monit.restart_watch 'redis'
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
standup-0.4.0 scripts/redis.rb
standup-0.3.37 scripts/redis.rb
standup-0.3.36 scripts/redis.rb
standup-0.3.35 scripts/redis.rb
standup-0.3.34 scripts/redis.rb
standup-0.3.33 scripts/redis.rb
standup-0.3.32 scripts/redis.rb
standup-0.3.31 scripts/redis.rb
standup-0.3.30 scripts/redis.rb
standup-0.3.29 scripts/redis.rb
standup-0.3.28 scripts/redis.rb