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.3.29 lib/tasks/redis.rake
daddy-0.3.28 lib/tasks/redis.rake
daddy-0.3.27 lib/tasks/redis.rake
daddy-0.3.26 lib/tasks/redis.rake
daddy-0.3.25 lib/tasks/redis.rake
daddy-0.3.24 lib/tasks/redis.rake
daddy-0.3.23 lib/tasks/redis.rake
daddy-0.3.22 lib/tasks/redis.rake
daddy-0.3.21 lib/tasks/redis.rake
daddy-0.3.20 lib/tasks/redis.rake
daddy-0.3.19 lib/tasks/redis.rake
daddy-0.3.18 lib/tasks/redis.rake
daddy-0.3.17 lib/tasks/redis.rake
daddy-0.3.16 lib/tasks/redis.rake
daddy-0.3.15 lib/tasks/redis.rake
daddy-0.3.14 lib/tasks/redis.rake
daddy-0.3.13 lib/tasks/redis.rake
daddy-0.3.12 lib/tasks/redis.rake
daddy-0.3.11 lib/tasks/redis.rake
daddy-0.3.10 lib/tasks/redis.rake