Sha256: de04249168ad98b936dbf4be7782aa2620ebb5b83a304430897993990e4c6ca9

Contents?: true

Size: 572 Bytes

Versions: 60

Compression:

Stored size: 572 Bytes

Contents

require 'rake'

namespace :dad do
  namespace :redis do

    desc "Redisをインストールします。"
    task :install do
      script = <<-EOF
#!/bin/bash

if [ -e /var/run/redis/redis.pid ]; then
  sudo /etc/init.d/redis stop
fi

sudo yum --enablerepo=epel install redis
sudo /sbin/chkconfig redis on
sudo /etc/init.d/redis start
EOF

      tmpfile = File.join(Rails.root, 'tmp', 'dad-redis-install-' + Daddy::Utils::StringUtils.current_time + '.sh')
      File.write(tmpfile, ERB.new(script).result)
      fail unless system("bash #{tmpfile}")
    end

  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
daddy-0.5.19 lib/tasks/redis.rake
daddy-0.5.18 lib/tasks/redis.rake
daddy-0.5.17 lib/tasks/redis.rake
daddy-0.5.16 lib/tasks/redis.rake
daddy-0.5.15 lib/tasks/redis.rake
daddy-0.5.14 lib/tasks/redis.rake
daddy-0.5.13 lib/tasks/redis.rake
daddy-0.5.12 lib/tasks/redis.rake
daddy-0.5.11 lib/tasks/redis.rake
daddy-0.5.10 lib/tasks/redis.rake
daddy-0.5.9 lib/tasks/redis.rake
daddy-0.5.8 lib/tasks/redis.rake
daddy-0.5.7 lib/tasks/redis.rake
daddy-0.5.6 lib/tasks/redis.rake
daddy-0.5.5 lib/tasks/redis.rake
daddy-0.5.4 lib/tasks/redis.rake
daddy-0.5.3 lib/tasks/redis.rake
daddy-0.5.2 lib/tasks/redis.rake
daddy-0.5.1 lib/tasks/redis.rake
daddy-0.5.0 lib/tasks/redis.rake