Skip to content

Instantly share code, notes, and snippets.

@cesare
Created September 9, 2011 12:58
Show Gist options
  • Save cesare/1206132 to your computer and use it in GitHub Desktop.
Save cesare/1206132 to your computer and use it in GitHub Desktop.
MacOSX launchd plist file to start MongoDB server
dbpath = /var/mongo/data
logpath = /var/mongo/logs/mongod.log
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.mongodb</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mongodb/bin/mongod</string>
<string>--config</string>
<string>/usr/local/etc/mongod.conf</string>
</array>
<key>UserName</key>
<string>daemon</string>
<key>OnDemand</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/var/mongo</string>
<key>StandardErrorPath</key>
<string>/var/mongo/logs/errors.log</string>
<key>StandardOutPath</key>
<string>/var/mongo/logs/output.log</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment