зеркало из https://github.com/microsoft/msphpsql.git
limited the loop to 10 times, max 60 sec wait
This commit is contained in:
Родитель
0fc91ae1f1
Коммит
7c305fadbc
|
@ -2,9 +2,15 @@ set -e
|
||||||
|
|
||||||
testConnection="/opt/mssql-tools/bin/sqlcmd -S sql -U sa -P Password123"
|
testConnection="/opt/mssql-tools/bin/sqlcmd -S sql -U sa -P Password123"
|
||||||
|
|
||||||
until $testConnection; do
|
for run in {1..10}; do
|
||||||
|
|
||||||
>&2 echo "SQL Server is starting up.."
|
>&2 echo "SQL Server is starting up.."
|
||||||
sleep 1
|
if $testConnection; then
|
||||||
|
>&2 echo "SQL Server is up!"
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
sleep 6
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
>&2 echo "SQL Server is up!"
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче