From 5d2d49fa0411d5aa51f27129cbebd95a0f044782 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Sat, 23 May 2020 18:12:16 +0200 Subject: [PATCH] [FREEBSD] Added url-check.csh script --- FreeBSD/url-check.csh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 FreeBSD/url-check.csh diff --git a/FreeBSD/url-check.csh b/FreeBSD/url-check.csh new file mode 100644 index 0000000..78bf628 --- /dev/null +++ b/FreeBSD/url-check.csh @@ -0,0 +1,10 @@ +#!/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