Last active
July 6, 2017 20:49
-
-
Save schulzh/617648940fde0fd3e55c98c2b15996fe to your computer and use it in GitHub Desktop.
Mining start script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
echo "Stopping running miner screen" | |
/usr/bin/screen -X -S mining quit > /dev/null || echo "Miner not running" | |
echo "OK" | |
export DISPLAY=":1" | |
if ! /usr/bin/xset q &>/dev/null; then # xset is included in package x11-xserver-utils | |
echo "No X server at \$DISPLAY [$DISPLAY], starting..." | |
/usr/bin/X "$DISPLAY" > /dev/null & | |
sleep 1 | |
fi | |
/usr/bin/nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a '[fan:0]/GPUTargetFanSpeed=70' | |
/usr/bin/nvidia-settings -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=1500' | |
/usr/bin/nvidia-settings -a "[gpu:1]/GPUFanControlState=1" -a '[fan:1]/GPUTargetFanSpeed=70' | |
/usr/bin/nvidia-settings -a '[gpu:1]/GPUMemoryTransferRateOffset[3]=1500' | |
/usr/bin/screen -S mining /root/ethminer/bin/ethminer --farm-recheck 200 -U -S eth-eu1.nanopool.org:9999 -O 0xe434184bd56c999d4939da317ddc3e28ecc5e0a5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment