mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
20 lines
No EOL
405 B
Bash
Executable file
20 lines
No EOL
405 B
Bash
Executable file
#!/bin/bash
|
|
|
|
total=0
|
|
MAX_WAIT_SECONDS="${MAX_WAIT_SECONDS:=60}"
|
|
|
|
echo "waiting $MAX_WAIT_SECONDS seconds for the server to start"
|
|
|
|
while [[ "$total" -le "$MAX_WAIT_SECONDS" ]]; do
|
|
if bin/mmctl system status --local 2> /dev/null; then
|
|
exit 0
|
|
else
|
|
((total=total+1))
|
|
printf "."
|
|
sleep 1
|
|
fi
|
|
done
|
|
|
|
printf "\nserver didn't start in $MAX_WAIT_SECONDS seconds\n"
|
|
|
|
exit 1 |