Files
NecroHash/rebuild_sha.sh

41 lines
928 B
Bash
Executable File

#!/bin/bash
# Rebuild cgminer strictly for SHA256 (Gridseed)
if [ "$EUID" -ne 0 ]; then
echo "Bitte als root ausführen."
exit 1
fi
echo "=== Stoppe Miner ==="
systemctl stop necrohash-miner
echo "=== Bereinige alte Build-Dateien ==="
cd /tmp
rm -rf cgminer-gc3355
echo "=== Clone dtbartle/cgminer-gc3355 ==="
git clone https://github.com/dtbartle/cgminer-gc3355.git
cd cgminer-gc3355
echo "=== Konfiguriere Build (SHA256 Only) ==="
export CFLAGS="-fcommon -O2"
if [ -f "./autogen.sh" ]; then
./autogen.sh
else
autoreconf -ivf
fi
# WICHTIG: --disable-scrypt explizit setzen (obwohl default oft disable ist, aber hier sichergehen)
# Und --enable-gridseed
./configure --enable-gridseed --disable-scrypt --without-curses
echo "=== Kompiliere... (Das dauert ca. 5-10 Minuten) ==="
make -j1
echo "=== Installiere ==="
make install
echo "=== Fertig ==="
echo "Starte Miner neu..."
systemctl start necrohash-miner