postgresql: Don't wait for ages in post-start if the service has failed

This commit is contained in:
Eelco Dolstra 2012-12-19 12:59:28 +01:00
parent 3ef1432866
commit fb8af2f9b6

View File

@ -199,7 +199,8 @@ in
# Wait for PostgreSQL to be ready to accept connections. # Wait for PostgreSQL to be ready to accept connections.
postStart = postStart =
'' ''
while ! psql postgres -c ""; do while ! psql postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 0.1 sleep 0.1
done done
''; '';