how do I disable automatic start on mac os x?

Started by Chris Withersover 16 years ago16 messagesgeneral
Jump to latest
#1Chris Withers
chris@simplistix.co.uk

Hi All,

I installed postgres from the enterprisedb-maintained one-click
installer at http://www.postgresql.org/download/macosx.

However, it starts automatically when the machine boots up, and I'd like
it only to start when I manually start it.

I've found an entry in launchd:

$ sudo launchctl list | grep post
com.edb.launchd.postgresql-8.4

...but I can't find where this comes from:

$ sudo find / -name com.edb.launchd.postgresql-8.4
$

Where do I find this entry to disable it?
(and, perhaps showing my Mac-ignorance, is there a GUI for launchd
configuration that I'm somehow missing?)

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#2Naoko Reeves
naokoreeves@gmail.com
In reply to: Chris Withers (#1)
Re: how do I disable automatic start on mac os x?

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

On Mon, Jan 4, 2010 at 1:43 AM, Chris Withers <chris@simplistix.co.uk> wrote:

Hi All,

I installed postgres from the enterprisedb-maintained one-click installer at
http://www.postgresql.org/download/macosx.

However, it starts automatically when the machine boots up, and I'd like it
only to start when I manually start it.

I've found an entry in launchd:

$ sudo launchctl list | grep post
com.edb.launchd.postgresql-8.4

...but I can't find where this comes from:

$ sudo find / -name com.edb.launchd.postgresql-8.4
$

Where do I find this entry to disable it?
(and, perhaps showing my Mac-ignorance, is there a GUI for launchd
configuration that I'm somehow missing?)

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
Sincerely,
Naoko Reeves

#3Chris Withers
chris@simplistix.co.uk
In reply to: Naoko Reeves (#2)
Re: how do I disable automatic start on mac os x?

Naoko Reeves wrote:

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

/Library/StartupItems is empty.

I think putting stuff in there is an old-fashioned way of doing things
that went out with Mac OS X 10.4, and I'm glad to say it looks like the
latest postgres doesn't install like this..

...however, that still leaves me back at square 1 with respect to
disabling the auto-startup of postgres.

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#4Dave Page
dpage@pgadmin.org
In reply to: Chris Withers (#3)
Re: how do I disable automatic start on mac os x?

On Mon, Jan 4, 2010 at 1:38 PM, Chris Withers <chris@simplistix.co.uk> wrote:

Naoko Reeves wrote:

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

/Library/StartupItems is empty.

I think putting stuff in there is an old-fashioned way of doing things that
went out with Mac OS X 10.4, and I'm glad to say it looks like the latest
postgres doesn't install like this..

Look in /Library/LaunchDaemons/

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#5Chris Withers
chris@simplistix.co.uk
In reply to: Dave Page (#4)
Re: how do I disable automatic start on mac os x?

Dave Page wrote:

On Mon, Jan 4, 2010 at 1:38 PM, Chris Withers <chris@simplistix.co.uk> wrote:

Naoko Reeves wrote:

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

/Library/StartupItems is empty.

I think putting stuff in there is an old-fashioned way of doing things that
went out with Mac OS X 10.4, and I'm glad to say it looks like the latest
postgres doesn't install like this..

Look in /Library/LaunchDaemons/

Ah, there it is... but now what do I do with it to disable the auto-start?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#6Dave Page
dpage@pgadmin.org
In reply to: Chris Withers (#5)
Re: how do I disable automatic start on mac os x?

On Mon, Jan 4, 2010 at 1:42 PM, Chris Withers <chris@simplistix.co.uk> wrote:

Dave Page wrote:

On Mon, Jan 4, 2010 at 1:38 PM, Chris Withers <chris@simplistix.co.uk>
wrote:

Naoko Reeves wrote:

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

/Library/StartupItems is empty.

I think putting stuff in there is an old-fashioned way of doing things
that
went out with Mac OS X 10.4, and I'm glad to say it looks like the latest
postgres doesn't install like this..

Look in /Library/LaunchDaemons/

Ah, there it is... but now what do I do with it to disable the auto-start?

Iirc, you have to change:

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

to

<key>RunAtLoad</key>
<false/>

Sachin; can you confirm please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#7Chris Withers
chris@simplistix.co.uk
In reply to: Dave Page (#6)
Re: how do I disable automatic start on mac os x?

Dave Page wrote:

Iirc, you have to change:

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

to

<key>RunAtLoad</key>
<false/>

I feel slightly stupid asking this, but this is a Mac, surely there's
some pretty shiny GUI for editing things like this?
(even Windows has the "Services" stuff in Control Panel)

What am I missing?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#8Sachin Srivastava
sachin.srivastava@enterprisedb.com
In reply to: Dave Page (#6)
Re: how do I disable automatic start on mac os x?

On 01/04/2010 07:13 PM, Dave Page wrote:

On Mon, Jan 4, 2010 at 1:42 PM, Chris Withers<chris@simplistix.co.uk> wrote:

Dave Page wrote:

On Mon, Jan 4, 2010 at 1:38 PM, Chris Withers<chris@simplistix.co.uk>
wrote:

Naoko Reeves wrote:

Try check this directory: Library: StartupItems: postgres-plus-8.xx
there should be script to start automatically.

/Library/StartupItems is empty.

I think putting stuff in there is an old-fashioned way of doing things
that
went out with Mac OS X 10.4, and I'm glad to say it looks like the latest
postgres doesn't install like this..

Look in /Library/LaunchDaemons/

Ah, there it is... but now what do I do with it to disable the auto-start?

Iirc, you have to change:

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

to

<key>RunAtLoad</key>
<false/>

Sachin; can you confirm please?

Yes. Though the daemon is loaded during startup.
and you can start it by using launchctl as ( sudo launchctl start
com.edb.launchd. postgresql-8.4).
Also you can always move/delete the plist file to avoid that also.

--
Regards,
Sachin Srivastava
EnterpriseDB <http://www.enterprisedb.com&gt;, the Enterprise Postgres
<http://www.enterprisedb.com&gt; company.

#9Dave Page
dpage@pgadmin.org
In reply to: Chris Withers (#7)
Re: how do I disable automatic start on mac os x?

On Mon, Jan 4, 2010 at 2:32 PM, Chris Withers <chris@simplistix.co.uk> wrote:

Dave Page wrote:

Iirc, you have to change:

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

to

       <key>RunAtLoad</key>
       <false/>

I feel slightly stupid asking this, but this is a Mac, surely there's some
pretty shiny GUI for editing things like this?
(even Windows has the "Services" stuff in Control Panel)

What am I missing?

If there is, I never found it.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#10Chris Withers
chris@simplistix.co.uk
In reply to: Sachin Srivastava (#8)
Re: how do I disable automatic start on mac os x?

Sachin Srivastava wrote:

Iirc, you have to change:

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

to

<key>RunAtLoad</key>
<false/>

Sachin; can you confirm please?

Yes. Though the daemon is loaded during startup.

Will setting RunAtLoad to false not stop that?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#11Sachin Srivastava
sachin.srivastava@enterprisedb.com
In reply to: Chris Withers (#10)
Re: how do I disable automatic start on mac os x?

On 01/04/2010 08:07 PM, Chris Withers wrote:

Sachin Srivastava wrote:

Iirc, you have to change:

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

to

<key>RunAtLoad</key>
<false/>

Sachin; can you confirm please?

Yes. Though the daemon is loaded during startup.

Will setting RunAtLoad to false not stop that?

RunAtLoad = false means, the daemon is loaded not executed/launched. If
you dont want it to load at system startup. Remove the plist from that
directory. (i.e. /Library/LaunchDaemons)

Chris

--
Regards,
Sachin Srivastava
EnterpriseDB <http://www.enterprisedb.com&gt;, the Enterprise Postgres
<http://www.enterprisedb.com&gt; company.

#12Chris Withers
chris@simplistix.co.uk
In reply to: Sachin Srivastava (#11)
Re: how do I disable automatic start on mac os x?

Sachin Srivastava wrote:

Will setting RunAtLoad to false not stop that?

RunAtLoad = false means, the daemon is loaded not executed/launched. If
you dont want it to load at system startup. Remove the plist from that
directory. (i.e. /Library/LaunchDaemons)

I don't want postgres to start on machine start, but I do want it to
start when I click the "start server" icon in the Postgres application
folder.

If I delete this plist, will that still work?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

#13John DeSoi
desoi@pgedit.com
In reply to: Chris Withers (#7)
Re: how do I disable automatic start on mac os x?

On Jan 4, 2010, at 9:32 AM, Chris Withers wrote:

I feel slightly stupid asking this, but this is a Mac, surely there's some pretty shiny GUI for editing things like this?
(even Windows has the "Services" stuff in Control Panel)

What am I missing?

I've used this in the past but it looks like support was dropped a few months ago. Hopefully some one else will pick it up.

http://sourceforge.net/projects/lingon/

John DeSoi, Ph.D.

#14Scott Ribe
scott_ribe@killerbytes.com
In reply to: Chris Withers (#5)
Re: how do I disable automatic start on mac os x?

Ah, there it is... but now what do I do with it to disable the auto-start?

sudo launchctl unload -w blahblahblah.plist

The -w option causes it to not only unload the item, but also write a
<disabled> key into it which will stop it from loading at launch.

--
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice

#15edwardIshaq
edward.ishaq@gmail.com
In reply to: Chris Withers (#7)
Re: how do I disable automatic start on mac os x?

if you do:
open
OS X will open the file in the plist editor.
I tried doing that but didn't get a way with saving though :)

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-do-I-disable-automatic-start-on-mac-os-x-tp1926565p4754428.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#16Scott Ribe
scott_ribe@elevated-dev.com
In reply to: edwardIshaq (#15)
Re: how do I disable automatic start on mac os x?

On Aug 31, 2011, at 8:46 AM, edwardIshaq wrote:

if you do:
open
OS X will open the file in the plist editor.
I tried doing that but didn't get a way with saving though :)

Probably a privileges violation, right? In a prior message on this thread I suggested:

sudo launchctl unload -w blahblahblah.plist

I also said: "The -w option causes it to not only unload the item, but also write a
<disabled> key into it which will stop it from loading at launch."

That is no longer true. Instead of the disabled key, 10.6 & up (or was it 10.5 & up?) now keep track of enabled/disabled elsewhere, so you really need to use launchctl instead of editing the plist.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice