Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] os x postresql startup question



On Jan 2, 2015, at 1:21 PM, David N. Blank-Edelman <dnb at ccs.neu.edu> wrote:
> 
> 
>> On Jan 2, 2015, at 1:14 PM, Eric Chadbourne <eric.chadbourne at icloud.com> wrote:
>> 
>> Where is the start up of PostgreSQL controlled in OS X Yosemite?
> 
> It is likely being started via launchd. An easy way to edit launchd entries is to get the Lingon app (https://www.peterborgapps.com/lingon/).
> 
> BTW, if you just want to play with Postgres on OSX, there is a lovely Postgres.app created by one of the Heroku people:
> 
> http://postgresapp.com
> 
>   -- dNb
> 


Hi All,

Cool looking apps David.  I?ll check them out.

I would like to learn how OSX controls programs.  Good tip about launchd.

Here?s what I?ve found.

$ sudo launchctl list | grep postgresql
52	0	com.edb.launchd.postgresql-9.4

And I found this here:

/Library/LaunchDaemons/com.edb.launchd.postgresql-9.4.plist

*Attempt #1*

In the xml I see:

        <key>RunAtLoad</key>
        <true/>

I changed true to false and restarted but for some reason the app still started.

Fail.

*Attempt #2*

I then tried this command:

sudo launchctl unload com.edb.launchd.postgresql-9.4.plist

I noticed in the xml file that it added a <disabled> key.  Strangley PosgreSQL still starts on boot.

Fail.

*Attempt #3*

$ sudo mv /Library/LaunchDaemons/com.edb.launchd.postgresql-9.4.plist /Users/eric/

This works.  PostgreSQL doesn?t start.  But when I want to start PostgreSQL with

sudo launchctl start <point to new location of plist>

it gives no error but doesn?t actually start anything.

Fail.

I have plenty of linux boxen to play with and don?t need to do this on a mac.  I?m just curious about how this new toy works.  I?ll probably remove the Enterprise DB app unless I?ve missed something.

Thanks,

Eric



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org