/[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

Contents of /test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sat Apr 21 08:43:47 2001 UTC (23 years ago) by dpavlin
Branch: MAIN
File MIME type: application/x-sh
probe skripta za servise

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

  ViewVC Help
Powered by ViewVC 1.1.26