I spent the last few hours attempting to get Postgres to start via
launchd in OS X Tiger, so I thought I'd share with the community what
I ended up doing:
I created a file called "org.postgres.PostgreSQL.plist", which I'm
including at the end of this message.
Simply place the file in the /Library/LaunchAgents folder, restart,
and Voila! Your DB server should be running.
Feel free to email me if you've got ?s.
cheers,
-n
Here is the file (between the equals signs at the top and bottom)
====
<?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>GID</key>
<integer>502</integer>
<key>GroupName</key>
<string>postgres</string>
<key>Label</key>
<string>org.postgres.PostgreSQL</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/pgsql/bin/postmaster</string>
<string>-D</string>
<string>/usr/local/pgsql/data</string>
</array>
<key>ServiceDescription</key>
<string>PostgreSQL Database Server</string>
<key>UID</key>
<integer>502</integer>
<key>UserName</key>
<string>postgres</string>
</dict>
</plist>
====