Sha256: 523f87054750d6348cf3fb2da0fdc1617d255e820dfabcf8b66e7e73710fb2f9

Contents?: true

Size: 916 Bytes

Versions: 8

Compression:

Stored size: 916 Bytes

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 "rake redis:install"
    end

    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

8 entries across 8 versions & 1 rubygems

Version Path
standup-0.3.27 scripts/redis.rb
standup-0.3.26 scripts/redis.rb
standup-0.3.25 scripts/redis.rb
standup-0.3.24 scripts/redis.rb
standup-0.3.23 scripts/redis.rb
standup-0.3.22 scripts/redis.rb
standup-0.3.20 scripts/redis.rb
standup-0.3.19 scripts/redis.rb