blog 虛擬貨幣

ETHOS auto reboot function

<?php
date_default_timezone_set(‘Asia/Hong_Kong’);
echo “The time is ” . date(“Y/m/d h:i:sa”).”\n”;
$homepage = file(‘../../run/ethos/stats.file’);
foreach($homepage as $line){
if(strstr($line,”miner_hashes:”)){
$miner_hashes = strstr($line,”miner_hashes:”);
$miner_hashes = str_replace(“miner_hashes:”,””,$line);
$hashes = explode(” “,$miner_hashes);
$i = 0;
foreach($hashes as $gpu_hash){
if($gpu_hash <= 0){
echo “GPU”.$i.”-“.$gpu_hash.”\n”;
echo “reboot now”.”\n”;
shell_exec(‘sudo /sbin/shutdown -r now’); // reboot now
}
$i++;
}
}
}
// Ubuntu cronjob command:
// crontab -e
// */6 * * * * php /home/ethos/benz.php > /home/ethos/benz_reboot.log 2>&1
?>

鐘意我D文既話, 可以請我飲杯咖啡仔! XDDD

 

ETH-Wallet-Address: 0x28C8241c321a84DDa13F1454eFAe182569454e13

Zcash-Wallet-Address: t1Q9wi3yMKLX7osEugxNw6VaB9dEdmvsiCP

BTC-Wallet-Address: 1N4Hy1KqUnSgZ5QJuEFqwLrjQs5VzaLePw

小編Gatecoin推薦碼: MZSRGU

Facebook Comments

發表迴響