Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge "Install PostgreSQL as a service."
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Bozeman authored and Gerrit Code Review committed Jul 25, 2011
2 parents 274c1b5 + 4866091 commit f78eec3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions setup/vcap_setup
Expand Up @@ -366,6 +366,28 @@ if [ $? != 0 ]; then
fi
fi

X=`which psql`
if [ $? != 0 ]; then
if [[ $ALL_SERVICES != true ]]; then
read -p "Should I add PostgreSQL Server? [y/N] "
if [[ $REPLY =~ ^[yY]$ ]]; then
POSTGRESQL=true
fi
fi

if [[ $POSTGRESQL == true || $ALL_SERVICES == true ]]; then
echo "Installing PostgreSQL server and support"

apt-get install -qqy postgresql libpq-dev
if [[ -n "$POSTGRESQL_PASS" ]]; then
su - postgres -c "/usr/bin/psql -c \"alter role postgres password '$POSTGRESQL_PASS'\""
fi
echo "Installing pg gems"
gem install pg --no-rdoc --no-ri
echo ""
fi
fi

REDIS_VERSION=2.2.4

redis_current=`redis-server -v | grep $REDIS_VERSION`
Expand Down

0 comments on commit f78eec3

Please sign in to comment.