aswi2021bc304crew-gitlab/docker/init-db.sh @ fad0afca
1 | fad0afca | Dominik Chlouba | #run the setup script to create the DB and the schema in the DB
|
---|---|---|---|
2 | #do this in a loop because the timing for when the SQL instance is ready is indeterminate
|
||
3 | for i in {1..50}; |
||
4 | do
|
||
5 | /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Leuze01 -d master -i setup.sql |
||
6 | if [ $? -eq 0 ] |
||
7 | then
|
||
8 | echo "setup.sql completed" |
||
9 | break
|
||
10 | else |
||
11 | echo "not ready yet..." |
||
12 | sleep 1
|
||
13 | fi
|
||
14 | done
|