Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Postgres if not running #93

Closed
croaky opened this issue Apr 16, 2013 · 5 comments · Fixed by #254
Closed

Run Postgres if not running #93

croaky opened this issue Apr 16, 2013 · 5 comments · Fixed by #254
Labels

Comments

@croaky
Copy link
Contributor

croaky commented Apr 16, 2013

The laptop script currently installs, but does not run or set a plist file for Postgres. For the Mac script, we should be able to grab the lines from brew info postgres. Not sure what to use for the if statement.

@djcp
Copy link
Contributor

djcp commented Apr 16, 2013

"ps ux | grep postgres" ? or something to that effect. Brew installed stuff
runs under your account, right?

If it didn't, you'd do something like (as on debian) "ps u -u postgres"
or (probably better) "/etc/init.d/postgresql status" I wouldn't be
surprised if the command used to initialize the daemon under homebrew kept
the "status" target.

On Tue, Apr 16, 2013 at 12:23 PM, Dan Croak notifications@github.comwrote:

The laptop script currently installs, but does not run or set a plist file
for Postgres. For the Mac script, we should be able to grab the lines from brew
info postgres. Not sure what to use for the if statement.


Reply to this email directly or view it on GitHubhttps://github.com//issues/93
.

@croaky
Copy link
Contributor Author

croaky commented Jun 27, 2013

Homebrew instructions are:

initdb /usr/local/var/postgres -E utf8
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

@djcp djcp added the osx label Apr 4, 2014
@gohanlon
Copy link
Contributor

This issue and #243 more or less the same issue.

@croaky
Copy link
Contributor Author

croaky commented Jul 19, 2014

The initdb part appears to be handled by the Postgres formula now:

  def post_install
    unless File.exist? "#{var}/postgres"
      system "#{bin}/initdb", "#{var}/postgres"
    end
  end

croaky pushed a commit that referenced this issue Jul 19, 2014
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

Also fixes #93 and #243.

Idempotently creates Postgres database cluster and starts (or restarts)
Postgres.
@croaky
Copy link
Contributor Author

croaky commented Jul 19, 2014

Take a look at #254. I believe that is a pretty decent idempotent fix.

@croaky croaky closed this as completed Jul 19, 2014
croaky pushed a commit that referenced this issue Jul 20, 2014
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

Also fixes #93 and #243.

Idempotently creates Postgres database cluster and starts (or restarts)
Postgres.
croaky pushed a commit that referenced this issue Jul 22, 2014
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes #93
* Fixes #243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
bmorrall pushed a commit to bmorrall/laptop that referenced this issue Dec 23, 2014
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes thoughtbot#93
* Fixes thoughtbot#243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
jt14den pushed a commit to ucsdlib/laptop that referenced this issue Nov 3, 2016
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes thoughtbot#93
* Fixes thoughtbot#243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants