File: get-qmailanalog

package info (click to toggle)
qmailanalog-installer 0.70-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 64 kB
  • ctags: 2
  • sloc: sh: 197; makefile: 43
file content (23 lines) | stat: -rwxr-xr-x 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

echo -n "get-qmailanalog: Trying to download qmailanalog..."

wget -q --tries=3 --output-document=/usr/src/qmailanalog-installer/qmailanalog_0.70.orig.tar.gz http://cr.yp.to/software/qmailanalog-0.70.tar.gz

if [ -e /usr/src/qmailanalog-installer/qmailanalog_0.70.orig.tar.gz ]; then
	SUM=`md5sum /usr/src/qmailanalog-installer/qmailanalog_0.70.orig.tar.gz | awk '{print $1}'`
	if [ "$SUM" = "84a3d44cbf2dbd88e8b97edd98c65732" ]; then
        	echo "  download succeeded!"
		exit 0
	else
	    echo ""
	    echo "downloaded file is corrupt. Try running get-qmailanalog again"
	    echo "at a later time."
		exit 1 
	fi
else
	echo ""
    echo "download failed.  Try running get-qmailanalog again"
    echo "at a later time."
	exit 1
fi