53 lines
929 B
Bash
53 lines
929 B
Bash
#!/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" |