mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	[Standardization]: Same Setup for GoLang on all LXC's & Clear Tarball (#1977)
This commit is contained in:
		@@ -81,12 +81,13 @@ $STD apt-get install -y nodejs
 | 
			
		||||
msg_ok "Installed Node.js"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
cd /tmp
 | 
			
		||||
set +o pipefail
 | 
			
		||||
GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz")
 | 
			
		||||
wget -q https://golang.org/dl/${GO_RELEASE}
 | 
			
		||||
tar -xzf ${GO_RELEASE} -C /usr/local
 | 
			
		||||
ln -s /usr/local/go/bin/go /usr/bin/go
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
@@ -33,16 +33,16 @@ msg_ok "Installed Caddy"
 | 
			
		||||
read -r -p "Would you like to install xCaddy Addon? <y/N> " prompt
 | 
			
		||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
			
		||||
  msg_info "Installing Golang"
 | 
			
		||||
  cd /opt
 | 
			
		||||
  set +o pipefail
 | 
			
		||||
  GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
 | 
			
		||||
  wget -q https://golang.org/dl/$GOLANG
 | 
			
		||||
  tar -xzf $GOLANG -C /usr/local
 | 
			
		||||
  ln -s /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
  temp_file=$(mktemp)
 | 
			
		||||
  golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
  wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
  tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
  ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
  rm -f "$temp_file"
 | 
			
		||||
  set -o pipefail
 | 
			
		||||
  rm -rf /opt/go*
 | 
			
		||||
  msg_ok "Installed Golang"
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
  msg_info "Setup xCaddy"
 | 
			
		||||
  cd /opt
 | 
			
		||||
  RELEASE=$(curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
 
 | 
			
		||||
@@ -42,10 +42,12 @@ msg_ok "Installed pnpm"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
set +o pipefail
 | 
			
		||||
GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/$GOLANG
 | 
			
		||||
tar -xzf $GOLANG -C /usr/local
 | 
			
		||||
ln -s /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -26,10 +26,14 @@ $STD apt-get install -y cmake
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
$STD wget https://golang.org/dl/go1.23.2.linux-amd64.tar.gz
 | 
			
		||||
$STD tar -xzf go1.23.2.linux-amd64.tar.gz -C /usr/local
 | 
			
		||||
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -rf go1.23.2.linux-amd64.tar.gz
 | 
			
		||||
set +o pipefail
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up Intel® Repositories"
 | 
			
		||||
 
 | 
			
		||||
@@ -35,12 +35,13 @@ $STD apt-get install -y nodejs
 | 
			
		||||
msg_ok "Installed Node.js"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
cd /tmp
 | 
			
		||||
set +o pipefail
 | 
			
		||||
GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz")
 | 
			
		||||
wget -q https://golang.org/dl/${GO_RELEASE}
 | 
			
		||||
tar -xzf ${GO_RELEASE} -C /usr/local
 | 
			
		||||
ln -s /usr/local/go/bin/go /usr/bin/go
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,10 +21,14 @@ $STD apt-get install -y mc
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
$STD wget https://golang.org/dl/go1.20.1.linux-amd64.tar.gz
 | 
			
		||||
$STD tar -xzf go1.20.1.linux-amd64.tar.gz -C /usr/local
 | 
			
		||||
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -rf go1.20.1.linux-amd64.tar.gz
 | 
			
		||||
set +o pipefail
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing RTSPtoWeb"
 | 
			
		||||
 
 | 
			
		||||
@@ -23,10 +23,12 @@ msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Golang"
 | 
			
		||||
set +o pipefail
 | 
			
		||||
RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/$RELEASE
 | 
			
		||||
tar -xzf $RELEASE -C /usr/local
 | 
			
		||||
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1)
 | 
			
		||||
wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file"
 | 
			
		||||
tar -C /usr/local -xzf "$temp_file"
 | 
			
		||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
set -o pipefail
 | 
			
		||||
msg_ok "Installed Golang"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user