Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

A couple simple changes to prifi.sh #210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helpers.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
9 changes: 5 additions & 4 deletions prifi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down