scripts/FreeBSD/url-check.csh

11 lines
207 B
Tcsh
Raw Normal View History

2020-05-23 18:12:16 +02:00
#!/bin/csh -f
set URL=$1
set HS=$2
set STATUS=`curl -L -o /dev/null -s -w "%{http_code}\n" -m 1 $URL`
if ($STATUS == 200) then
/usr/local/bin/curl -fsS --retry 3 $HS > /dev/null
else
exit 1
endif