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.4.10 lib/tasks/redis.rake
daddy-0.4.9 lib/tasks/redis.rake
daddy-0.4.8 lib/tasks/redis.rake
daddy-0.4.7 lib/tasks/redis.rake
daddy-0.4.6 lib/tasks/redis.rake
daddy-0.4.5 lib/tasks/redis.rake
daddy-0.4.4 lib/tasks/redis.rake
daddy-0.4.3 lib/tasks/redis.rake
daddy-0.4.2 lib/tasks/redis.rake
daddy-0.4.1 lib/tasks/redis.rake
daddy-0.4.0 lib/tasks/redis.rake
daddy-0.3.38 lib/tasks/redis.rake
daddy-0.3.37 lib/tasks/redis.rake
daddy-0.3.36 lib/tasks/redis.rake
daddy-0.3.35 lib/tasks/redis.rake
daddy-0.3.34 lib/tasks/redis.rake
daddy-0.3.33 lib/tasks/redis.rake
daddy-0.3.32 lib/tasks/redis.rake
daddy-0.3.31 lib/tasks/redis.rake
daddy-0.3.30 lib/tasks/redis.rake