/[hr-web]/test.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Wed Jun 19 18:32:42 2002 UTC (18 years, 4 months ago) by ravilov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -2 lines
File MIME type: application/x-sh
lotsa changes... :)

1 dpavlin 1.1 #!/bin/sh
2    
3     headers=/tmp/mailh$$
4     mail=/tmp/mail$$
5    
6 ravilov 1.2 rm -f $headers
7     echo "To: cs-alert@pliva.hr,ravilov@pliva.hr" >> $headers
8     echo "Subject: HR-web warning on `date`" >> $headers
9 dpavlin 1.1 echo >> $headers
10     send=0
11    
12     if ! wget -q -O /dev/null http://hr-web.pliva.hr/ ; then
13     echo "http://hr-web.pliva.hr ne odgovara!" >> $mail
14     echo "Provjeriti dpavlinusic.pliva.hr u Dobricinoj sobi!" >> $mail
15     send=1
16     fi
17    
18     if ! wget -q -O /dev/null http://ntsap02.pliva.hr:81/ ; then
19     echo "http://ntsap02.pliva.hr ne odgovara!" >> $mail
20     echo "Provjeriti: da li je startan 4D application server na ntsap02, port na kojem radi (mora biti 81) " >> $mail
21     send=1
22     fi
23    
24     if ! wget -q -O /dev/null http://ntsap01.pliva.hr:80/ ; then
25     echo "http://ntsap01.pliva.hr ne odgovara!" >> $mail
26     echo "Provjeriti: da li je startan 4D application server na ntsap01, port na kojem radi (mora biti 80) " >> $mail
27     send=1
28     echo "ntsap01 panika" | smbclient -M asusanj
29     fi
30    
31     if [ $send = 1 -a -f $mail ] ; then
32     if ! diff $mail /tmp/mail.last 2>&1 >/dev/null ; then
33     cat $headers $mail | /usr/sbin/sendmail -t
34     cat $mail
35     fi
36     mv $mail /tmp/mail.last
37     fi

  ViewVC Help
Powered by ViewVC 1.1.26