From c8fe3c363b8d2a6204cdd00ffbb9d83c8eabba91 Mon Sep 17 00:00:00 2001
From: CanbiZ <47820557+MickLesk@users.noreply.github.com>
Date: Wed, 22 Jan 2025 10:43:34 +0100
Subject: [PATCH] Update sqlserver2022-install.sh

---
 install/sqlserver2022-install.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/install/sqlserver2022-install.sh b/install/sqlserver2022-install.sh
index 440e3c3f1..976da3875 100644
--- a/install/sqlserver2022-install.sh
+++ b/install/sqlserver2022-install.sh
@@ -35,11 +35,12 @@ msg_info "Installing SQL Server Tools"
 curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
 curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
 $STD apt-get update
+echo "mssql-tools18 mssql-tools18/license_terms select yes" | sudo debconf-set-selections
 $STD apt-get install -y \
   mssql-tools18 \
   unixodbc-dev
-echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
-source ~/.bashrc
+echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
+source ~/.bash_profile
 msg_ok "Installed SQL Server Tools"
 
 read -r -p "Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt