mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
19 lines
487 B
Bash
19 lines
487 B
Bash
![]() |
#!/bin/bash -eu
|
||
|
export SYNCV3_BINDADDR=0.0.0.0:8844
|
||
|
|
||
|
# Run the binary and stop it afterwards.
|
||
|
./syncv3 &
|
||
|
SYNCV3_PID=$!
|
||
|
trap "kill $SYNCV3_PID" EXIT
|
||
|
|
||
|
# wait for the server to be listening, we want this endpoint to 404 instead of connrefused
|
||
|
until [ \
|
||
|
"$(curl -s -w '%{http_code}' -o /dev/null "http://localhost:8844/idonotexist")" \
|
||
|
-eq 404 ]
|
||
|
do
|
||
|
echo 'Waiting for server to start...'
|
||
|
sleep 1
|
||
|
done
|
||
|
|
||
|
echo 'Checking client is reachable...'
|
||
|
curl -f -LI "http://localhost:8844/client/"
|