#!/bin/sh
#
# termconnect :	This file controls the process of connecting with
#                 a local host via term. Calls are made to other
#                 scripts to send queued mail and retreive our mail
#                 from our remote host.
#
#
#
# Last modified: 04/12/95
#
# Author: David J. Lennox  < djlennox@mtu.edu >
#
#
#

#
# Start Kermit and connect with remote host.
#

reset
kermit -y ~/.term/.kermtrc

echo ""
term < /dev/cua2 > /dev/cua2 &     ###  Replace with your modem device.  ###

sleep 2
echo ""

#
# Call runq to send queued mail.
#

runq

sleep 2
echo ""

#
# Call getmail to retreive mail from remote host.
#

getmail

#
# Sync local time with network. 
#
# NOTE: trdated must be running as a daemon process. This is usually
#       accomplished by starting trdated from rc.local at boot time.
#       Also you must be root for this to work.
#

trdate 

sleep 1  
echo "Time reset. New time is:"

date

sleep 1  
echo "" 
echo "Finished. Network is active... "


# Done!
