From c38b319c3d0b3f17dee3c30f49a0857106db9147 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Sat, 23 May 2020 19:31:38 +0200 Subject: [PATCH] [FreeBSD] Added curl location variable --- FreeBSD/url-check.csh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FreeBSD/url-check.csh b/FreeBSD/url-check.csh index 238b85c..a9703ce 100644 --- a/FreeBSD/url-check.csh +++ b/FreeBSD/url-check.csh @@ -1,23 +1,24 @@ #!/bin/csh -f set MODE=$1 +set CURL=/usr/local/bin/curl if ($MODE == no_auth) then set URL=$2 set HS=$3 - set STATUS=`curl -L -o /dev/null -s -w "%{http_code}\n" -m 1 $URL` + set STATUS=`$CURL -L -o /dev/null -s -w "%{http_code}\n" -m 1 $URL` else if ($MODE == auth) then set AUTH=$2 set URL=$3 set HS=$4 - set STATUS=`curl -L -o /dev/null -s -w "%{http_code}\n" -m 1 --user $AUTH $URL` + set STATUS=`$CURL -L -o /dev/null -s -w "%{http_code}\n" -m 1 --user $AUTH $URL` else exit 1 endif if ($STATUS == 200) then - /usr/local/bin/curl -fsS --retry 3 $HS > /dev/null + $CURL -fsS --retry 3 $HS > /dev/null else exit 1 endif \ No newline at end of file