php-sqlsrv/entrypoint.sh

13 lines
282 B
Bash
Raw Normal View History

2017-07-29 02:18:07 +02:00
set -e
2017-08-02 21:38:18 +02:00
while ! ping -c3 $1 &>/dev/null; do echo "Ping Fail - `date`"; done ; echo "Host Found - `date`";
testConnection="/opt/mssql-tools/bin/sqlcmd -S $1 -U $2 -P $3"
2017-07-29 02:18:07 +02:00
2017-08-02 21:38:18 +02:00
until $testConnection; do
>&2 echo "SQL Server is starting up.."
2017-07-29 02:18:07 +02:00
sleep 1
done
2017-08-02 18:46:59 +02:00
>&2 echo "SQL Server is up!"