2023-06-13 16:23:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-06-14 08:07:49 +02:00
|
|
|
# Wait for Temporal to be ready
|
2023-06-13 16:23:52 +02:00
|
|
|
SECONDS=0
|
2023-06-14 08:07:49 +02:00
|
|
|
TIMEOUT=180
|
2023-06-13 16:23:52 +02:00
|
|
|
|
2023-06-14 08:07:49 +02:00
|
|
|
# Check Temporal by just checking that the port is open
|
2023-06-13 16:23:52 +02:00
|
|
|
while true; do
|
2023-06-14 08:07:49 +02:00
|
|
|
if nc -z localhost 7233; then
|
|
|
|
echo "Temporal is up!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $SECONDS -ge $TIMEOUT ]; then
|
|
|
|
echo "Timed out waiting for Temporal to be ready"
|
2023-06-13 16:23:52 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2023-06-14 08:07:49 +02:00
|
|
|
|
|
|
|
echo "Waiting for Temporal to be ready"
|
|
|
|
sleep 1
|
2023-06-13 16:23:52 +02:00
|
|
|
done
|