23 lines
1.7 KiB
PowerShell
23 lines
1.7 KiB
PowerShell
# Igneum playbook: fresh miner v4 install and start. Downloads igneum-windows-v4.zip, replaces C:\igneum-v4, starts START-IGNEUM.bat in its own window.
|
|
# Queue: node tools/relay.mjs run PC1 "miner v4" relay/playbooks/miner-v4.ps1
|
|
# UNTESTED on a PC as of 4 Oct 2026.
|
|
$ErrorActionPreference = 'Continue'
|
|
$zipUrl = "$env:RELAY_DL_BASE/igneum-windows-v4.zip" # the agent holds the downloads base (X26); never a token in this file
|
|
$root = 'C:\igneum-v4'
|
|
$zip = Join-Path $env:TEMP 'igneum-windows-v4.zip'
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
$old = Join-Path $root 'igneum-windows\STOP-IGNEUM.bat'
|
|
if (Test-Path $old) { Write-Host 'stopping the running miner'; & cmd.exe /c "`"$old`"" 2>&1 | Out-Null; Start-Sleep 3 }
|
|
Get-Process igneum-miner, igneumd -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
|
|
Write-Host "downloading igneum-windows-v4.zip from the downloads host"
|
|
Invoke-WebRequest -Uri $zipUrl -OutFile $zip -UseBasicParsing -TimeoutSec 900
|
|
if (Test-Path $root) { Remove-Item $root -Recurse -Force }
|
|
New-Item -ItemType Directory -Force -Path $root | Out-Null
|
|
Expand-Archive -Path $zip -DestinationPath $root -Force
|
|
$start = Join-Path $root 'igneum-windows\START-IGNEUM.bat'
|
|
if (-not (Test-Path $start)) { Write-Host "ERROR: $start missing after extract"; Get-ChildItem $root -Recurse | Select-Object -First 20 | ForEach-Object { $_.FullName }; exit 2 }
|
|
Write-Host "starting $start in a new window"
|
|
Start-Process cmd.exe -ArgumentList '/k', "`"$start`"" -WorkingDirectory (Split-Path $start)
|
|
Start-Sleep 20
|
|
Get-Process igneum-miner, igneumd -ErrorAction SilentlyContinue | ForEach-Object { Write-Host ("running: " + $_.ProcessName + " pid " + $_.Id) }
|
|
exit 0
|