postgresql: Don't wait for ages in post-start if the service has failed
This commit is contained in:
parent
3ef1432866
commit
fb8af2f9b6
@ -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
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user