Date: Sun, 16 Dec 2001 22:12:23 -0500 (EST) From: Tim Kellers <timothyk@serv1.wallnet.com> To: BSD Freak <bsd-freak@mbox.com.au> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: ping failure script Message-ID: <20011216221023.W69928-100000@serv1.wallnet.com> In-Reply-To: <113fc9110004.110004113fc9@mbox.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
If you've a bent to program, check out "expect" in /usr/lang/ports It's not difficult to learn or use, and it's very well suited to that kind of thing. Tim Kellers CPE/NJIT On Mon, 17 Dec 2001, BSD Freak wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011216221023.W69928-100000>