From owner-freebsd-questions Sun Dec 16 19: 6:48 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.mbox.com.au (203-134-146-019.cust.pth.iprimus.net.au [203.134.146.19]) by hub.freebsd.org (Postfix) with ESMTP id BF71037B416 for ; Sun, 16 Dec 2001 19:06:38 -0800 (PST) Received: from nms2.mbox.com.au (webmail.i7mail.com.au [192.168.20.4]) by smtp2.mbox.com.au (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6) with ESMTP id <0GOG00L4FWHRZB@smtp2.mbox.com.au> for freebsd-questions@FreeBSD.ORG; Mon, 17 Dec 2001 11:03:27 +0800 (WST) Received: from mbox.com.au ([127.0.0.1]) by nms2.mbox.com.au (Netscape Messaging Server 4.15) with ESMTP id GOGWIC00.4MA for ; Mon, 17 Dec 2001 11:03:48 +0800 Date: Mon, 17 Dec 2001 14:03:48 +1100 From: BSD Freak Subject: ping failure script To: FreeBSD Questions Message-id: <113fc9110004.110004113fc9@mbox.com.au> MIME-version: 1.0 X-Mailer: Netscape Webmail Content-type: text/plain; charset=us-ascii Content-language: en Content-disposition: inline Content-transfer-encoding: 7BIT X-Accept-Language: en Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I want to run a shell script from cron that has the following logic but I am totally unsure where to start with the syntax. It goes like this: IF 3 consecutive pings to my.host.com fail THEN echo "Link is DOWN!!" | mail me@mycompany.com end Thanks in advance.... --------------------------------------------------------------------- Your own fax service 24x7, no extra line or fax machine required http://www.mbox.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message