chiark / gitweb /
394b3fbf04e8d46465f4b8135a24bd8db0e1831b
[chiark-utils.git] / backup / driver
1 #!/bin/sh
2
3 cd /var/local/backup
4 PATH=/usr/local/lib/backup:$PATH export PATH
5
6 if [ "x$1" != test ]; then
7         stty sane
8         stty -isig
9 fi
10
11 rm -f this-status p p2
12 echo 'FAILED to start dump script' >this-status
13
14 full 2>&1 | tee this-log
15
16 status=`cat this-status 2>/dev/null`
17
18 cat <<END - this-log | /usr/lib/sendmail -oi -om -odq -t
19 To: dump-reports
20 Subject: Dump Report: $status
21
22 END
23
24 rm -f /TAPEID
25
26 if [ "x$1" != test ]; then
27         bringup
28         stty isig
29 fi