#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically

URL="%(url)s"
MATCH="%(match)s"

if [ -z $URL ]; then
  echo "No URL specified." >&2
  exit 3
fi

%(curl_path)s -k -sL $URL --max-time 10 | grep "$MATCH" > /dev/null

if [ $? != 0 ]; then
  echo "Content at $URL seems to be corrupted" >&2
  exit 1
fi
