Skip to content

Commit

Permalink
feat: mssql 초기화 스크립트 성공하면 서버 재시작 하도록 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
iwaltgen committed Feb 21, 2024
1 parent 8286156 commit 4d384c8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mssql/bin/configure-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 4d384c8

Please sign in to comment.