Skip to content

Commit b03f894

Browse files
authored
fix self sign certif issue
1 parent 328f532 commit b03f894

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

script/run-initialization.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ echo "Database initialisaton"
1515
# if the table does not exsit it will create the table
1616

1717
# get "1" if the database exist : tr get only the integer, cut only the first integer (the second is the number of row affected)
18-
data=$($SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -Q "SELECT COUNT(*) FROM master.dbo.sysdatabases WHERE name = N'$DB_NAME'" | tr -dc '0-9'| cut -c1 )
18+
data=$($SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -Q "SELECT COUNT(*) FROM master.dbo.sysdatabases WHERE name = N'$DB_NAME'" | tr -dc '0-9'| cut -c1 )
1919
if [[ ${data} -eq "0" ]]; then
2020
echo 'download full demo database'
2121
echo 'create database user'
22-
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -Q "CREATE LOGIN $DB_USER WITH PASSWORD='${SA_PASSWORD}', CHECK_POLICY = OFF"
22+
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -Q "CREATE LOGIN $DB_USER WITH PASSWORD='${SA_PASSWORD}', CHECK_POLICY = OFF"
2323
echo "merging files"
2424
./concatenate_files.sh
2525
echo 'create database'
2626
#/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $SA_PASSWORD -Q "DROP DATABASE IF EXISTS $DB_NAME"
27-
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -Q "CREATE DATABASE $DB_NAME"
27+
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -Q "CREATE DATABASE $DB_NAME"
2828

2929
if [[ "$INIT_MODE" = "demo" ]]; then
30-
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -i output/fullDemoDatabase.sql -d $DB_NAME | grep . | uniq -c
30+
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -i output/fullDemoDatabase.sql -d $DB_NAME | grep . | uniq -c
3131
else
32-
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -i output/fullEmptyDatabase.sql -d $DB_NAME | grep . | uniq -c
32+
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -i output/fullEmptyDatabase.sql -d $DB_NAME | grep . | uniq -c
3333
fi
3434
echo ' give to the user the access to the database'
35-
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -Q "EXEC sp_changedbowner '$DB_USER'" -d $DB_NAME
35+
$SQLCMD_PATH -S localhost -U SA -P $SA_PASSWORD -C -Q "EXEC sp_changedbowner '$DB_USER'" -d $DB_NAME
3636
else
3737
echo "database already existing, nothing to do"
3838
fi

0 commit comments

Comments
 (0)