Sha256: f2627dbe594eec607e3fccb013a8deeb2a87484f217a08617315bd06cc34db95

Contents?: true

Size: 1.24 KB

Versions: 3

Compression:

Stored size: 1.24 KB

Contents

Capistrano.configuration(:must_exist).load do
  
  set :memcache_ip, '127.0.0.1'
  set :memcache_port, 11211
  set :memcache_memory, 256
  
  # XXX needs thought/work
  task :memcached_start do
    run "memcached -d -m #{memcache_memory} -l #{memcache_ip} -p #{memcache_port}"
  end
  
  # XXX needs thought/work
  task :memcached_stop do
    run "killall memcached"
  end
  
  # XXX needs thought/work
  task :memcached_restart do
    memcached_stop
    memcached_start
  end
  
  task :install_memcached do
    version = 'memcached-1.2.2'
    set :src_package, {
      :file => version + '.tar.gz',   
      :md5sum => 'a08851f7fa7b15e92ee6320b7a79c321  memcached-1.2.2.tar.gz', 
      :dir => version,  
      :url => "http://www.danga.com/memcached/dist/#{version}.tar.gz",
      :unpack => "tar zxf #{version}.tar.gz;",
      :configure => %w{
        ./configure
        --prefix=/usr/local 
        ;
        }.reject{|arg| arg.match '#'}.join(' '),
      :make => 'make;',
      :install => 'make install;',
      :post_install => 'install -b scripts/memcached-init /etc/init.d/memcached;'
    }
    apt.install( {:base => %w(libevent-dev)}, :stable )
    deprec.download_src(src_package, src_dir)
    deprec.install_from_src(src_package, src_dir)
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deprec-1.9.1 lib/deprec/recipes/memcache.rb
deprec-1.9.3 lib/deprec/recipes/memcache.rb
deprec-1.9.2 lib/deprec/recipes/memcache.rb