Author

Topic: [MultiPool.us] profitability switcher for Linux (Read 847 times)

donator
Activity: 686
Merit: 519
It's for the children!
January 05, 2014, 11:11:24 AM
#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 '
';
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;/
#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
Jump to: