diff --git a/helpers.lib.sh b/helpers.lib.sh index 66d22c95f..8692462d5 100644 --- a/helpers.lib.sh +++ b/helpers.lib.sh @@ -35,7 +35,7 @@ test_go(){ fi GO_VER=$(go version 2>&1 | sed 's/.*version go\([[:digit:]]*\)\.\([[:digit:]]*\)\(.*\)/\1\2/; 1q') if [ "$GO_VER" -lt "$min_go_version" ]; then - echo -e "$errorMsg Go >= 1.7.0 is required" + echo "$errorMsg Go >= $(echo $min_go_version | sed 's/./&./') is required" exit 1 fi } diff --git a/prifi.sh b/prifi.sh index fe9b5d2cf..95837019a 100755 --- a/prifi.sh +++ b/prifi.sh @@ -260,6 +260,9 @@ case $1 in "$thisScript" relay > relay.log 2>&1 & RELAYPID=$! THISPGID=$(ps -o pgid= "$RELAYPID" | sed -e "s/^ //") + + trap 'echo; echo "Gonna run kill -TERM -- -$THISPGID"; kill -TERM -- -$THISPGID' 2 + echo -e "$okMsg" sleep "$sleeptime_between_spawns" @@ -281,10 +284,8 @@ case $1 in done - read -p "PriFi deployed. Press [enter] to kill all..." key - echo "Gonna run kill -TERM -- -\"$THISPGID\"" - - kill -TERM -- -"$THISPGID" + echo "PriFi deployed. Press ^C to kill all..." + wait ;; gen-id|Gen-Id|GEN-ID)