Created
June 4, 2011 10:32
-
-
Save noqqe/1007794 to your computer and use it in GitHub Desktop.
Bitcoin Mining Script for Debian
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 | |
### 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 | |
[email protected] | |
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 | |
where can i run the script kindly
Good
thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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