From bc813ab31f96e1a9662157e69cab66be204afd1d Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 24 Jun 2021 12:38:18 +0200 Subject: [PATCH] Add nohup to start-ipfs-server.ps1 --- Scripts/start-ipfs-server.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scripts/start-ipfs-server.ps1 b/Scripts/start-ipfs-server.ps1 index 3830352e..a73d5e74 100755 --- a/Scripts/start-ipfs-server.ps1 +++ b/Scripts/start-ipfs-server.ps1 @@ -9,7 +9,7 @@ try { "⚠️ 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) 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..." - & ipfs daemon - if ($lastExitCode -ne "0") { throw "'ipfs daemon' failed" } + Start-Process nohup 'ipfs daemon' - "IPFS server has stopped" - exit 1 + "Done." + exit 0 } catch { write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1