couchdb: ensure new default.ini is used.

Closes Homebrew/homebrew#31030.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Robert Newson 2014-07-21 19:32:34 +01:00 committed by Mike McQuaid
parent cb4007c8a1
commit fedfd43515

View file

@ -59,6 +59,16 @@ class Couchdb < Formula
(var+'log/couchdb').mkpath
end
def post_install
# default.ini is owned by CouchDB and marked not user-editable
# and must be overwritten to ensure correct operation.
if (etc/"couchdb/default.ini.default").exist?
# but take a backup just in case the user didn't read the warning.
mv etc/"couchdb/default.ini", etc/"couchdb/default.ini.old"
mv etc/"couchdb/default.ini.default", etc/"couchdb/default.ini"
end
end
plist_options :manual => "couchdb"
def plist; <<-EOS.undent