add test that ensures bootstrap can not run when postgres is running

This commit is contained in:
Sam Saffron 2014-01-06 21:26:29 -08:00
parent 0b0d6fcb5c
commit d7ed7814e9
1 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,14 @@ hooks:
to: sv start postgres || exit 1
run:
# temporary
- exec: apt-get install -y socat
- exec: mkdir -p /shared/postgres_run
- exec: chown postgres:postgres /shared/postgres_run
- exec: chmod 775 /shared/postgres_run
- exec: rm -fr /var/run/postgresql
- exec: ln -s /shared/postgres_run /var/run/postgresql
- exec: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
- file:
path: /etc/service/postgres/run
chmod: "+x"