mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-19 08:28:19 +02:00
Add nohup to start-ipfs-server.ps1
This commit is contained in:
parent
66cc3cc635
commit
bc813ab31f
@ -9,7 +9,7 @@ try {
|
|||||||
"⚠️ Make sure your router does not block port 4001 (TCP/UDP) for IPv4/v6!"
|
"⚠️ Make sure your router does not block port 4001 (TCP/UDP) for IPv4/v6!"
|
||||||
""
|
""
|
||||||
|
|
||||||
"1️⃣ Step 1/5: searching for ipfs executable..."
|
"Step 1/5: searching for ipfs executable..."
|
||||||
$Result = (ipfs --version)
|
$Result = (ipfs --version)
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'ipfs' - make sure IPFS is installed and available" }
|
if ($lastExitCode -ne "0") { throw "Can't execute 'ipfs' - make sure IPFS is installed and available" }
|
||||||
|
|
||||||
@ -35,11 +35,10 @@ try {
|
|||||||
|
|
||||||
"Step 5/5: starting daemon..."
|
"Step 5/5: starting daemon..."
|
||||||
|
|
||||||
& ipfs daemon
|
Start-Process nohup 'ipfs daemon'
|
||||||
if ($lastExitCode -ne "0") { throw "'ipfs daemon' failed" }
|
|
||||||
|
|
||||||
"IPFS server has stopped"
|
"Done."
|
||||||
exit 1
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user