Run Postgres if not running #93

Closed
croaky opened this Issue Apr 16, 2013 · 5 comments

3 participants

@croaky
thoughtbot, inc. member

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
@croaky
thoughtbot, inc. member

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

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

@croaky
thoughtbot, inc. member

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 croaky added a commit that referenced this issue Jul 19, 2014
@croaky croaky Switch to launchctl for Postgres
`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.
23ad3c5
@croaky
thoughtbot, inc. member

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

@croaky croaky closed this Jul 19, 2014
@croaky croaky added a commit that referenced this issue Jul 20, 2014
@croaky croaky Switch to launchctl for Postgres
`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.
242c017
@croaky croaky added a commit that referenced this issue Jul 22, 2014
@croaky croaky Switch to launchctl for Postgres
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes #93
* Fixes #243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
15355e5
@robkilby robkilby pushed a commit that referenced this issue Jul 28, 2014
@croaky croaky Switch to launchctl for Postgres
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes #93
* Fixes #243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
5df9b58
@robkilby robkilby pushed a commit that referenced this issue Aug 6, 2014
@croaky croaky Switch to launchctl for Postgres
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes #93
* Fixes #243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
c8b59d8
@robkilby robkilby pushed a commit that referenced this issue Aug 6, 2014
@croaky croaky Switch to launchctl for Postgres
`brew services` is no longer supported:

Homebrew/legacy-homebrew@c0b99c0

* Fixes #93
* Fixes #243
* Idempotently creates Postgres database cluster and starts (or restarts)
  Postgres.
6c4cdd3
@bmorrall bmorrall added a commit to bmorrall/laptop that referenced this issue Dec 23, 2014
@croaky croaky Switch to launchctl for Postgres
`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.
5b42f4f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment