-
-
Save MarHoff/9e1cf08ca20278818df6e60e89e00330 to your computer and use it in GitHub Desktop.
A variation of petere/pg-travis-test.sh that just set up a postgres cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
sudo apt-get update | |
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common" | |
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de | |
sudo update-alternatives --remove-all postmaster.1.gz | |
# stop all existing instances (because of https://github.com/travis-ci/travis-cookbooks/pull/221) | |
sudo service postgresql stop | |
# and make sure they don't come back | |
echo 'exit 0' | sudo tee /etc/init.d/postgresql | |
sudo chmod a+x /etc/init.d/postgresql | |
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $packages | |
status=0 | |
sudo pg_createcluster --start $PGVERSION test -p 55435 -- -A trust |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment