#!/bin/sh

HOSTNAME=$1
FILE=$2
MD5SUM_ORIG=$3

MD5SUM=$(wget -q -O "-" "http://$HOSTNAME$FILE" | md5sum | awk '{print $1}')

if [ "$MD5SUM" = "$MD5SUM_ORIG" ]; then
	echo "MD5SUM: $MD5SUM"
	exit 0
else
	echo "MD5SUM: none"
	exit 2
fi
