Skip to content

Commit

Permalink
Merge pull request #48 from data-catering/mssql
Browse files Browse the repository at this point in the history
Add in microsoft sql server (mssql)
  • Loading branch information
pflooky authored Jul 10, 2024
2 parents 56fde20 + be73d95 commit bb2af99
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions data/mssql/mssql-health-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -euo pipefail

# wait for MSSQL server to start
export STATUS=1
i=0

while [[ $STATUS -ne 0 ]] && [[ $i -lt 30 ]]; do
i=$i+1
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $SA_PASSWORD -Q 'SELECT @@VERSION' >> /dev/null
STATUS=$?
done

if [ $STATUS -ne 0 ]; then
echo "Error: MSSQL SERVER took more than thirty seconds to start up."
exit 1
fi

0 comments on commit bb2af99

Please sign in to comment.