Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bitcoin Mining Script for Debian
#!/bin/bash
### BEGIN INIT INFO
# Provides: BitCoinMining
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop BitCoing Mining poclbm-mod
### END INIT INFO
# I do not use my GPU a lot like the most Linux users (Minecraft excepted) and
# so i can spent it to a BitCoin MiningPool like deepbit.net
# Define as startup do:
# $ wget -O /etc/init.d/bitcoin https://gist.github.com/raw/1007794/bitcoin.sh
# chmod +x /etc/init.d/bitcoin
# update-rc.d bitcoin defaults
# Path to poclbm mining script
path_poclbm=/path/to/poclbm/dir/
# Pool data
POOLUSER=username@mail.com
POOLPASS=password
POOLURL=pit.deepbit.net
POOLPORT=8332
# Environment
BTCLOG=/var/log/bitcoin.log
BTCLOCK=/var/lock/bitcoinmining
case "$1" in
start)
echo $$ > $BTCLOCK
cd $path_poclbm
python poclbm-mod.py -d 0 -v -w 128 -f 60 -a 10 --user=$POOLUSER --pass=$POOLPASS -o $POOLURL -p $POOLPORT > $BTCLOG &
;;
stop)
if [ -r $BTCLOCK ]; then
BTCPID=$(cat $BTCLOCK)
# Increase PID because of its childy spawned command poclbm
((BTCPID++))
kill $BTCPID
rm $BTCLOCK
exit 0
fi
;;
*)
echo "Usage: /etc/init.d/bitcoin {start|stop}"
exit 1
;;
esac
exit 0
@Zeus-oche

This comment has been minimized.

Copy link

@Zeus-oche Zeus-oche commented Aug 26, 2020

Please is there one for terminal?

@Eddiel1980

This comment has been minimized.

Copy link

@Eddiel1980 Eddiel1980 commented Feb 20, 2021

how to insert it the termux because I have not been able to get a pc, I mean I have not been able to buy a pc

@Alex-274YT

This comment has been minimized.

Copy link

@Alex-274YT Alex-274YT commented Mar 19, 2021

How I Download the archive?

@Maicon244356

This comment has been minimized.

Copy link

@Maicon244356 Maicon244356 commented May 3, 2021

Como faço o download do arquivo

Só dá

git clone https://gist.github.com/noqqe/1007794/50f09692cb676e22ada98857b2df09013c7625b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment