From 0beb18ecf4dbda74a20eead9cda1bf5d6e63d7c2 Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Sun, 1 Sep 2019 05:10:32 -0300
Subject: [PATCH] Mejorando singlestart.sh

---
 bin/singlestart.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/singlestart.sh b/bin/singlestart.sh
index 9df1b8b..259463a 100755
--- a/bin/singlestart.sh
+++ b/bin/singlestart.sh
@@ -9,6 +9,7 @@ bootnodekeyfile=${BFANETWORKDIR}/bootnode/key
 
 # Bail out if anything fails.
 trap "exit 1" ERR
+trap "reaper" SIGINT
 unset LOGDIR LOGPIPE PIDIDX
 declare -A PIDIDX
 
@@ -90,7 +91,7 @@ monitor.js > ${LOGPIPE} 2>&1 &
 PIDIDX[$!]="monitor.js"
 
 max=-1
-while [ -n "${!PIDIDX[*]}" -a $max -eq 0 ]
+while [ -n "${!PIDIDX[*]}" -a $max -ne 0 ]
 do
     sleep 1
     max=$(( $max - 1 ))
-- 
GitLab