RE: Bash script
From: Myers, Mike (Mike.Myers@NWDC.IBS-LMCO.com)Date: 08/30/01
- Previous message: Cavell.McDermott@apw.com: "Re: Virus to Virus Idea"
- Maybe in reply to: Sousa Ferreira: "Bash script"
- Next in thread: Ryan Hilton: "Re: Bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Message-ID: <F34B3C833DDBD311B77800508B0CB0BF041EB0BA@nwdc02ex> From: "Myers, Mike" <Mike.Myers@NWDC.IBS-LMCO.com> To: "'Sousa Ferreira'" <sousaferreira@netcabo.pt>, "Security Basics" <security-basics@securityfocus.com> Subject: RE: Bash script Date: Thu, 30 Aug 2001 13:34:13 -0700
This is the code fragment I use to check ping. Wrapper it with a while
`true` and a sleep 60.
ping "$i" 2 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "host \"$i\" not answering ping...aborting"
exit
fi
Cheers,
- Mike Myers, mike.myers@nwdc.ibs-lmco.com
-----Original Message-----
From: Sousa Ferreira [mailto:sousaferreira@netcabo.pt]
Sent: August 30, 2001 9:05 AM
To: Security Basics
Subject: Bash script
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi ...
Long time reader, first time asker here!
Just wondering if someone could help with a "simple" script in $bash
i have to make.
I need a script that´s pings a certain ip, reads the reply and ... if
there is any reply, it reschedules itself to ping the ip again in
lets say 60 secs.
Otherwise it starts a daemon, firewall, backup smb daemon, etc. .
My doubt is on how to get the script to read the ping awnser
(afirmative or not).
The main interest in this is that if the primary firewall fails (UPS
probs i´m having and lack of $$ to other one ;) ) the backup one goes
off.
Sorry for the lamme question and thanks in advance for your opinions
on how can i do it.
______________________________________________//______________________
___________________________
As informações contidas neste email são confidenciais
e destinam-se apenas à(s) pessoa(s) para quem foi enviado.
PGP KeyID : 0xB7723B21
-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4
iQA/AwUBO45kGyNcH2C3cjshEQIHSwCfYbuVOFXRjOVM5/TcB/nhszIEwQUAn0O/
UDH6KJFEj0eFh6GskVHB0xSB
=GCeL
-----END PGP SIGNATURE-----
- Previous message: Cavell.McDermott@apw.com: "Re: Virus to Virus Idea"
- Maybe in reply to: Sousa Ferreira: "Bash script"
- Next in thread: Ryan Hilton: "Re: Bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|