Skip to content

Instantly share code, notes, and snippets.

@whoamiTM
Created February 2, 2020 04:05
Show Gist options
  • Save whoamiTM/96237d0d4ab81f7250b0a691228d0e35 to your computer and use it in GitHub Desktop.
Save whoamiTM/96237d0d4ab81f7250b0a691228d0e35 to your computer and use it in GitHub Desktop.
Sends PushOver notification when share is found solo mining with MiniZ
@ECHO
SETLOCAL ENABLEDELAYEDEXPANSION
:start
timeout.exe /T 1800
FOR /F "tokens=2-8 delims=.:/ " %%A in ("%date% %time%") DO SET DateNtime=%%D:%%E:%%F
FOR /F "tokens=1-4 delims= " %%A IN ('findstr.exe /I /R /C:"S: 1/0" miniZ.log') DO (
SET share=%%D
)
echo !share! | find "1/0" > nul
if errorlevel 1 goto start
if not errorlevel 1 curl -1 --form-string "token=*" --form-string "user=*" --form-string "message=%DateNtime% Share Accepted MINER01" https://api.pushover.net/1/messages.json --verbose
)
timeout.exe /T 30 > nul
shutdown /r /t 5 /f
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment