setup.sh 344 B

123456789101112
  1. #/bin/bash
  2. #wait for the SQL Server to come up
  3. sleep 15s
  4. cat /usr/setup/setup.sql.template | awk '{
  5. gsub(/%%DB%%/,"'$MSSQL_DATABASE'");
  6. gsub(/%%USER%%/,"'$MSSQL_USER'");
  7. gsub(/%%PWD%%/,"'$MSSQL_PASSWORD'")
  8. }1' > /usr/setup/setup.sql
  9. /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/setup/setup.sql