Skip to content
This repository was archived by the owner on May 9, 2018. It is now read-only.

Commit 72bf2ee

Browse files
author
Zachary DuBois
committed
Add curl check for tracking.
1 parent 2107e3d commit 72bf2ee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

do-cli-speedtest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ fi
8383

8484
if [[ $disallowTracking == false ]] || [[ $disallowTracking == "" ]]
8585
then
86+
which curl > /dev/null
87+
checkForCurl=$?
88+
if [[ "$checkForCurl" != "0" ]]
89+
then
90+
echo "$fail You need curl to enable tracking."
91+
exit 1
92+
fi
8693
echo "$notice You have selected not to opt out of tracking. Tracking only counts the number of tests and the test type (and the IP will be logged in the access log, etc)."
8794
echo "$notice The tracking URL is not called until the very end of the test. If you would like to opt out now, you can simply cancel this script and re-run it with the disallowTracking variable set. See README.md on Github for more information."
8895
elif [[ $disallowTracking == true ]]

0 commit comments

Comments
 (0)