From c5f077947c3e84635fa68417fb01f248a463e190 Mon Sep 17 00:00:00 2001
From: Henrik Triem <henrik.triem@netways.de>
Date: Thu, 17 Jun 2021 15:24:48 +0200
Subject: [PATCH] Add Icinga Go Script

---
 icinga-go | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 icinga-go

diff --git a/icinga-go b/icinga-go
new file mode 100755
index 0000000..6b4c299
--- /dev/null
+++ b/icinga-go
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+VERSION_GO="1.16.5"
+
+set -ex
+
+echo "Downloading Go Version ${VERSION_GO}"
+curl -LO https://golang.org/dl/go${VERSION_GO}.linux-amd64.tar.gz
+
+sudo rm -rf /usr/local/go
+
+echo "Unpacking Go"
+sudo tar -C /usr/local -xzf go${VERSION_GO}.linux-amd64.tar.gz
+
+echo "Deleting Go Binary Archive"
+sudo rm -rf go${VERSION_GO}.linux-amd64.tar.gz
+
+
+if [[ ! -e $HOME/.bashrc ]]; then
+    touch $HOME/.bashrc
+fi
+
+echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
+
+source $HOME/.bashrc
-- 
GitLab