neoneo-go/.docker/privnet-entrypoint.ps1

16 lines
369 B
PowerShell
Raw Normal View History

2021-11-19 12:23:51 +00:00
#!C:\Program Files\PowerShell\7\pwsh.EXE -File
$bin = '/usr/bin/neo-go.exe'
for ( $i = 0; $i -lt $args.count; $i++ ) {
if ($args[$i] -eq "node"){
Write-Host "=> Try to restore blocks before running node"
if (($Env:ACC -ne $null) -and (Test-Path $Env:ACC -PathType Leaf)) {
& $bin db restore -p --config-path /config -i $Env:ACC
}
break
}
}
& $bin $args