#!/bin/bash logs=$(docker logs $SERVICE 2>&1) redis1="# oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo" redis2="Ready to accept connections" scheduler="Registering birth" worker1="Worker rq:worker:" worker2="Listening on " oauth2token="Clouditor OAuth2 token endpoint not available" if ! [[ $logs =~ $redis1 ]] then echo "Redis server not started" 1>&2 exit 1 fi if ! [[ $logs =~ $redis2 ]] then echo "Redis server not started" 1>&2 exit 1 fi if ! [[ $logs =~ $scheduler ]] then echo "Redis queue scheduler not started" 1>&2 exit 1 fi if ! [[ $logs =~ $worker1 ]] then echo "Redis worker not started" 1>&2 exit 1 fi if ! [[ $logs =~ $worker2 ]] then echo "Redis worker not started" 1>&2 exit 1 fi if ! [[ $logs =~ $oauth2token ]] then echo "OAuth2 token authentication not working" 1>&2 exit 1 fi