This is an old revision of the document!
Tried 3 different forks… https://github.com/tpruvot/cpuminer-multi.git
Check Github for info.
They are all kind of the same. I tried to use the .json conf file but it kind of didnt work the way it was supposed to.
I start the miner with the following commands:
./cpuminer --syslog --algo=cryptonight --user=<YOURWALLET>.<WORKERNAME> --pass=x --url=stratum+tcp://cryptonight.eu.nicehash.com:3355 --background
Pass “x” is needed to make the “wallet.name” work. If you set your workername instead of “x” and remove the “.name” there will be no name shown or used!
I dont want to start the miner by path with commands so I created a startscript which you can place in /etc/init.d/. If you did that, you can start|stop|restart the miner with “service <scriptname> <start|stop|restart>”
Its not perfect yet, it doesnt write a pidfile and I kind of cant get the pid with ps -ef. Fix it yourself if you need this…
#!/bin/bash
SERVICENAME=/scripts/cpuminer-easy/cpuminer
PID=`ps -ef | grep '[c]puminer' | cut -d " " -f6`
case "$1" in
start)
SERVICE=nohup /scripts/cpuminer-easy/cpuminer-start.sh </dev/null $
#echo $! >/var/run/cpuminer.pid
[ $? -eq 0 ] && echo "$SERVICENAME was started"
;;
stop)
#kill -9 $(cat /var/run/cpuminer.pid)
#rm /var/run/cpuminer.pid
kill -9 $PID
[ $? -eq 0 ] && echo "$SERVICENAME was stopped"
;;
restart)
$0 stop
$0 start
;;
status)
#if [ -z "$PID" ];
#then
#echo "$SERVICENAME not running"
#else
#echo "$SERVICENAME is running"
#fi
;;
*)
echo "Usage: $0 (start|stop|restart)"
;;
esac
#!bin/bash /scripts/cpuminer-easy/cpuminer --syslog --algo=cryptonight --user=<YOURWALLET>.<WORKERNAME> --pass=x --url=stratum+tcp://cryptonight.eu.nicehash.com:3355 --background