#!/bin/sh
#
# This script is run by pppd after the PPP connection is ended.
#
# The companion file is /etc/ppp/ip-up, it's run when the PPP
# connection is started.
#
# This file is created when you run pppsetup: Sun Aug 16 14:59:28 CEST 1998
#
# The environment is cleared before executing this script
# so the path must be reset.
#
PATH=/usr/sbin:/sbin:/usr/bin:/usr/local/bin:/bin
export PATH

# Stop ping if you started it in /etc/ppp/ip-up.

#killall ping 2>/dev/null

# Stop the fetchmail daemon if you started it in /etc/ppp/ip-up
# with 'fetchmail -d 300'.

#fetchmail -q

# Send "ath" = hangup etc. to modem when ppp connection ends.
# You'll see the modem reponse OK and date in the /etc/ppp/modem.cua?, 
# modem.ttyS?, or modem.modem file.
# You need the 'modem-stats' program for this below to work.
# ftp://sunsite.unc.edu/pub/apps/serialcomm/modem 
# modem-stats-1.0.1.src.elf.tar.gz
# Remove the ##### from the lines below.

#sleep 2   # Make sure the modem is really down.
#DEV=`echo $2 | sed -e "s./dev/.."`
#echo "--------------------------" >> /etc/ppp/modem.$DEV
#date                              >> /etc/ppp/modem.$DEV
#modem-stats -c "ath" $2           >> /etc/ppp/modem.$DEV

# End...
