Skip to content

Instantly share code, notes, and snippets.

@noqqe
Created June 4, 2011 10:32
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save noqqe/1007794 to your computer and use it in GitHub Desktop.
Save noqqe/1007794 to your computer and use it in GitHub Desktop.
Bitcoin Mining Script for Debian
#!/bin/bash
### BEGIN INIT INFO
# Provides: BitCoinMining
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# X-Interactive: false
# Short-Description: Start/stop BitCoing Mining poclbm-mod
### END INIT INFO
# This is my private script for /etc/init.d/bitcoin
# It's gonna be executed everytime my debian starts up.
# I do not use my GPU a lot like the most Linux users (Minecraft excepted).
# This is becaus I run my bitcoin miner everyday.
# Use with this care.
# Define as startup do:
# $ wget -O /etc/init.d/bitcoin https://gist.github.com/
# 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
Copy link

Please is there one for terminal?

Copy link

ghost 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
Copy link

How I Download the archive?

@Maicon244356
Copy link

Como faço o download do arquivo

Só dá

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

@Princu786
Copy link

@Eddiel1980 you can download debian in your termux . Anlinux app which is on Play Store will give you latest link of debian and any other linux distro links for termux and even you can use gui mode with vncviewver

@TimothyMutai
Copy link

where can i run the script kindly

@safeer771
Copy link

Good

@ip-softsl
Copy link

thanks

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