#!/bin/sh
# $Header: /boot/home/code/cvsroot/scripts/FaxOnly,v 1.2 1998/05/17 02:21:26 jrand Exp $
#
#  FaxOnly
#
#  By: Jeremy Rand
#    Copyright 1997
#
# This script answers the phone and puts the modem into fax mode.  When
# it gets a connect, it starts receiving the fax.
#

cleanup () {
  ./tellModem -d onhook "$MODEM" stop > /dev/null
  exit
  }

cd "$1"
MODEM="$2"
MESSAGE="$3"

./tellModem -d offhook "$MODEM" fax "$MESSAGE"

cleanup
