Skip to content
Permalink
Newer
Older
100644 18 lines (15 sloc) 550 Bytes
1
#!/bin/bash
2
3
function wait_for_midpoint_start () {
4
ATTEMPT=0
5
MAX_ATTEMPTS=20
6
DELAY=10
7
8
until [[ $ATTEMPT = $MAX_ATTEMPTS ]]; do
9
ATTEMPT=$((ATTEMPT+1))
10
echo "Waiting $DELAY seconds for midPoint to start (attempt $ATTEMPT) ..."
11
sleep $DELAY
12
docker ps
13
( docker logs $1 2>&1 | grep "INFO (com.evolveum.midpoint.web.boot.MidPointSpringApplication): Started MidPointSpringApplication in" ) && return 0
14
done
15
16
echo midPoint did not start in $(( $MAX_ATTEMPTS * $DELAY )) seconds
17
return 1
18
}
You can’t perform that action at this time.