From c5548ecf6da47ac6d511b80ec17977ef6223dcb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BCnzer?= Date: Thu, 25 Jun 2026 11:53:28 +0000 Subject: [PATCH] =?UTF-8?q?hivello=20sh=20script=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripte/hivello_up.sh | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 scripte/hivello_up.sh diff --git a/scripte/hivello_up.sh b/scripte/hivello_up.sh new file mode 100644 index 0000000..bcf8915 --- /dev/null +++ b/scripte/hivello_up.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Dieses Script ist für die Aktuallisierung vom Hivellominer Node +# +# Eine Überarbeitung ist zulässig, muss aber dann wieder zur Verfügung gestellt werden +# +# Version 1.2 +# +# (c)2025 CeMunzIT Christopher Münzer + +clear + +dir="/opt/hivello/" +hv="hivello" +hvd="$hv.deb" + +if [ -d "$dir" ]; then + echo "Verzeichniss vorhanden" +else + echo "Verzeichniss wird erstellt" + if ! mkdir -p "$dir"; then + echo "Konnte Verzeichnis nicht erstellen" >&2 + exit 2 + fi + echo "Verzeichnis erfolgreich erstellt" +fi + +cd $dir + +if [ -f "$hvd" ]; then + echo "$hv vohanden und wird deinstalliert" + sleep 4 + dpkg -r $hv + echo "$hvd Datei wird gelöscht" + sleep 4 + rm -rf $hvd +else + echo "Datei ist nicht vorhanden und wird gedownloadet" +fi + +wget https://download.hivello.services/linux/hivello.deb + +sleep 4 + +cd $dir + +echo "neue Datei wird Installiert" + +sleep 3 + +dpkg -i $hvd + +echo "beendet" \ No newline at end of file