Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ "$1" = "-h" ] || [ -z "$1" ]; then
echo "Usage: pass miner's IP address to this script"
echo "or pass -h for this message :)"
exit 0
fi
if [ -z ${1+x} ]; then
MINER_IP_USE="$MINER_IP"
param (
[Parameter(Mandatory=$false)][string]$miner_ip = "none"
)
if ($miner_ip -eq "none")
{
Write-Output "Please pass the IP address of your miner as an argument"
Exit 1
}
$miner_status = Invoke-RestMethod -Uri "http://$miner_ip/status.json"
if(!$?)
# change this IP address to your miner's IP
$miner_ip="192.168.7.223"
$miner_status = Invoke-RestMethod -Uri "http://$miner_ip/status.json"
if(!$?)
{
Write-Output "Failed to connect to miner... exiting"
Exit 1
}
$snapshot_status = Invoke-RestMethod -Uri "https://us915.s3.amazonaws.com/assets/snaps/snapshot.json"
if(!$?)
Computer Information:
Manufacturer: Micro-Star International Co., Ltd.
Model: Z390-A PRO (MS-7B98)
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
CPU Family: 0x6