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