diff options
author | mutantturkey <[email protected]> | 2011-09-09 16:33:33 -0400 |
---|---|---|
committer | mutantturkey <[email protected]> | 2011-09-09 16:33:33 -0400 |
commit | 1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb (patch) | |
tree | d8f1118c540008015e042caec1dbe52aa93c46c8 /arch/calvin/trinity-qt3/189checkservices.sh | |
parent | 688262143652290b8fa3693b592359a0f0b54c55 (diff) | |
download | tde-packaging-1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb.tar.gz tde-packaging-1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb.zip |
started working on Qt3, made my own folder, when work is done, I will bring it into the main branch
Diffstat (limited to 'arch/calvin/trinity-qt3/189checkservices.sh')
-rw-r--r-- | arch/calvin/trinity-qt3/189checkservices.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/calvin/trinity-qt3/189checkservices.sh b/arch/calvin/trinity-qt3/189checkservices.sh new file mode 100644 index 000000000..bca50c93d --- /dev/null +++ b/arch/calvin/trinity-qt3/189checkservices.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +IP_ADDRESS_1=97.64.229.82 +IP_ADDRESS_2=97.64.229.83 + +STATUS_1=0 +STATUS_2=0 + +CURDATE=$('date') + +netcat -z ${IP_ADDRESS_1} 80 +if [ $? -eq 0 ] +then + STATUS_1=1 +else + sleep 5 + netcat -z ${IP_ADDRESS_1} 80 + if [ $? -eq 0 ] + then + STATUS_1=1 + else + echo "Interface 1 is DOWN" + fi +fi + +netcat -z ${IP_ADDRESS_2} 80 +if [ $? -eq 0 ] +then + STATUS_2=1 +else + sleep 5 + netcat -z ${IP_ADDRESS_2} 80 + if [ $? -eq 0 ] + then + STATUS_2=1 + else + echo "Interface 2 is DOWN" + fi +fi + +if [[ STATUS_1 == 0 ]]; then + mail -s "[SERVICE FAILURE NOTIFICATION] pearsoncomputing.net" [email protected] < "The network interface ${IP_ADDRESS_1}:80 failed to respond on ${CURDATE}" +fi + +if [[ STATUS_2 == 0 ]]; then + mail -s "[SERVICE FAILURE NOTIFICATION] pearsoncomputing.net" [email protected] < "The network interface ${IP_ADDRESS_2}:80 failed to respond on ${CURDATE}" +fi |