From cf544b1f2f4d7386d008793208993c119d898106 Mon Sep 17 00:00:00 2001 From: mreul Date: Mon, 24 Nov 2025 11:21:57 +0000 Subject: [PATCH] Hogere versie Go --- install_mailhog_as_service.sh | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/install_mailhog_as_service.sh b/install_mailhog_as_service.sh index f2a3eff..491201e 100644 --- a/install_mailhog_as_service.sh +++ b/install_mailhog_as_service.sh @@ -1,16 +1,28 @@ #!/bin/bash -apt update echo ""; -echo "==================================="; -echo "Install golang-go..."; -echo "==================================="; -apt-get -y install golang-go; -if [ $? == 0 ] ; then - echo 'golang-go installed' -else - echo 'ERROR: Installing golang-go NOT succesfull!' - exit -fi +set -e +GO_VERSION=1.22.5 # of een andere recente 1.22.x / 1.23.x +echo "===================================" +echo "Installeren van Go ${GO_VERSION}..." +echo "===================================" +apt-get update +apt-get -y install curl ca-certificates +cd /tmp +curl -LO https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz +# Oude Go-installatie weghalen (indien aanwezig) +rm -rf /usr/local/go +# Nieuwe Go installeren +tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz +# Go in PATH zetten voor dit script +export PATH=/usr/local/go/bin:$PATH +go version # zou nu go1.22.x moeten tonen +#apt-get -y install golang-go; +#if [ $? == 0 ] ; then +# echo 'golang-go installed' +#else +# echo 'ERROR: Installing golang-go NOT succesfull!' +# exit +#fi echo ""; echo "==================================="; echo "Installing mailhog...";