diff options
| author | Justin Hileman | 2012-04-06 12:15:47 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-16 20:10:51 -0700 |
| commit | 72c2fe2be1692dc48da9af15555552068c041fc5 (patch) | |
| tree | 46099056f352f327e5d2466322ce26261d1b4d3c | |
| parent | 422582bc055d6cc7ca1a61ff8345defccbc6058a (diff) | |
| download | homebrew-72c2fe2be1692dc48da9af15555552068c041fc5.tar.bz2 | |
Install `mongod.conf` if one isn't present.
Reduce the amount of mindless copy/paste required by one.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/mongodb.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Formula/mongodb.rb b/Library/Formula/mongodb.rb index 4b972ccc9..666c957fd 100644 --- a/Library/Formula/mongodb.rb +++ b/Library/Formula/mongodb.rb @@ -31,6 +31,9 @@ class Mongodb < Formula (prefix+'mongod.conf').write mongodb_conf plist_path.write startup_plist plist_path.chmod 0644 + + # copy the config file to etc if this is the first install. + etc.install prefix+'mongod.conf' unless File.exists? etc+"mongod.conf" end def caveats; <<-EOS.undent @@ -48,8 +51,6 @@ class Mongodb < Formula mongod run --config #{prefix}/mongod.conf The launchctl plist above expects the config file to be at #{etc}/mongod.conf. - If this is a first install, you can copy one from #{prefix}/mongod.conf: - cp #{prefix}/mongod.conf #{etc}/mongod.conf EOS end |
