 8c051b8186
			
		
	
	
		8c051b8186
		
			
		
	
	
	
	
		
			
			* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL * more switches * switch vms * more curls * More curls * more * more * more changes * more * prepare ipv6 calls * change frontend to ipv6 * Formatting * Fromatting * Update gomft.sh * Update gomft-install.sh * Update ersatztv.sh * Update build.func --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| # Copyright (c) 2021-2025 community-scripts ORG
 | |
| # Author: Kristian Skov
 | |
| # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | |
| # Source: https://www.microsoft.com/en-us/sql-server/sql-server-2022
 | |
| 
 | |
| source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | |
| color
 | |
| verb_ip6
 | |
| catch_errors
 | |
| setting_up_container
 | |
| network_check
 | |
| update_os
 | |
| 
 | |
| msg_info "Installing Dependencies"
 | |
| $STD apt install -y \
 | |
|   gpg \
 | |
|   coreutils
 | |
| msg_ok "Installed Dependencies"
 | |
| 
 | |
| msg_info "Setup SQL Server 2022"
 | |
| curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc >/dev/null
 | |
| curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list >/dev/null
 | |
| $STD apt-get update -y
 | |
| $STD apt-get install -y mssql-server
 | |
| msg_ok "Setup Server 2022"
 | |
| 
 | |
| msg_info "Installing SQL Server Tools"
 | |
| export DEBIAN_FRONTEND=noninteractive
 | |
| export ACCEPT_EULA=Y
 | |
| curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc >/dev/null
 | |
| curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list >/dev/null
 | |
| $STD apt-get update
 | |
| $STD apt-get install -y -qq \
 | |
|   mssql-tools18 \
 | |
|   unixodbc-dev
 | |
| 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
 | |
| if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | |
|   /opt/mssql/bin/mssql-conf setup
 | |
| else
 | |
|   msg_ok "Skipping SQL Server setup. You can run it later with '/opt/mssql/bin/mssql-conf setup'."
 | |
| fi
 | |
| 
 | |
| msg_info "Start Service"
 | |
| systemctl enable -q --now mssql-server
 | |
| msg_ok "Service started"
 | |
| 
 | |
| motd_ssh
 | |
| customize
 | |
| 
 | |
| msg_info "Cleaning up"
 | |
| $STD apt-get -y autoremove
 | |
| $STD apt-get -y autoclean
 | |
| msg_ok "Cleaned"
 |