From d7ed7814e9365d80add794811cac2888c7d6c344 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 6 Jan 2014 21:26:29 -0800 Subject: [PATCH] add test that ensures bootstrap can not run when postgres is running --- templates/postgres.template.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 40f41a2..1c83fc7 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -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" -- 2.25.1