From 8de552ef2f0f6bf8eb818174877c39aa316e1d95 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 30 Oct 2012 14:46:24 +0000 Subject: redis: fix configuration file for upgrades. Fixes #15737. Fixes #15671. References #15610. --- Library/Formula/redis.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Library') diff --git a/Library/Formula/redis.rb b/Library/Formula/redis.rb index 746fb2cde..f7e0beaf6 100644 --- a/Library/Formula/redis.rb +++ b/Library/Formula/redis.rb @@ -30,6 +30,12 @@ class Redis < Formula s.gsub! "\# bind 127.0.0.1", "bind 127.0.0.1" end + # Fix redis upgrade from 2.4 to 2.6. + if File.readlines(etc/'redis.conf').grep(/^vm-enabled/) + mv etc/'redis.conf', etc/'redis.conf.old' + ohai "Your redis.conf will not work with 2.6; moved it to redis.conf.old" + end + etc.install 'redis.conf' unless (etc/'redis.conf').exist? end -- cgit v1.2.3