Bitcoin Forum
June 15, 2024, 02:13:21 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [MultiPool.us] profitability switcher for Linux  (Read 813 times)
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
January 05, 2014, 04:11:24 PM
 #1

MultiPool.us has some strange and unreasonable love for PPC.  All profits from mining trc, zet, frc are lost when the site swaps to PPC mining.  The system used for BTC mining is also not as profitable as ghash.io or guild. 

This fixes it.  This one is for the stratum server on my cubes same thing will work on a regular cgminer screen session as well.

Php to poll the site:
Code:
<?
$url="https://www.multipool.us/";
$ch = curl_init();

$header=array(

);

curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_COOKIEFILE,'cookies.txt');
curl_setopt($ch,CURLOPT_COOKIEJAR,'cookies.txt');
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
$result=curl_exec($ch);
print '<pre>';
print_r($result);
curl_close($ch);
?>

Then a bash script:
Code:
#!/bin/bash
while :
do

#Pull multipool.us current coin
php mp.php > test

#process coin being mined
NEW=`grep -A 10 sha-256 test| grep -A 1 currently| sed '1d'|sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed 's/^[ \t]*//'`

#error check current
if [[ -z "$CUR" ]]; then
        CUR="btc"
fi

#error check new
if [[ -z "$NEW" ]]; then
        NEW="btc"
fi

if [ "$NEW" == "ppc" ]; then
        NEW="btc"
fi

if-z-var-e-var
if [ "$NEW" != "$CUR" ] && [ "$NEW" == "btc" ]; then
        screen -S proxy -p 0 -X quit
        screen -dmS proxy /home/miner/stratum-mining-proxy/mining_proxy.py -o us1.ghash.io -p 3333
else
        if [ "$NEW" != "$CUR" ] && [ "$NEW" != "btc" ]; then
                screen -S proxy -p 0 -X quit
                screen -dmS proxy /home/miner/stratum-mining-proxy/mining_proxy.py -o pool1.us.multipool.us -p 8888

        fi
fi
sleep 600
done

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!