From 4d384c8076a93c96e438bc9d1a04906aae15c3cd Mon Sep 17 00:00:00 2001 From: iwaltgen Date: Wed, 21 Feb 2024 17:17:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20mssql=20=EC=B4=88=EA=B8=B0=ED=99=94=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=84=B1=EA=B3=B5?= =?UTF-8?q?=ED=95=98=EB=A9=B4=20=EC=84=9C=EB=B2=84=20=EC=9E=AC=EC=8B=9C?= =?UTF-8?q?=EC=9E=91=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mssql/bin/configure-db.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mssql/bin/configure-db.sh b/mssql/bin/configure-db.sh index 818c2b6..b9a3e7e 100755 --- a/mssql/bin/configure-db.sh +++ b/mssql/bin/configure-db.sh @@ -29,6 +29,14 @@ if [ $DBSTATUS -ne 0 ] || [ $ERRCODE -ne 0 ]; then exit 1 fi -# Run the setup script to create the DB and the schema in the DB echo "starting sqlcmd user setup script ..." + +# Run the setup script to create the DB and the schema in the DB /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/local/mssql/init.d/setup.sql +ERRCODE=$? +if [ $ERRCODE -ne 0 ]; then + exit 1 +fi + +echo "setup success. shutdown server ..." +/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -Q "SHUTDOWN WITH NOWAIT"