#!/bin/sh
#
# an example /etc/ppp/ip-down script for "normal" tcharge mode
# kill tcharge
#
# File containing the PID of `tcharge':
PID_FILE=/var/run/tcharge.pid
# File for statistical purpose:
STAT_FILE=$HOME/.telecom
#
if [ ! -s $PID_FILE ]; then
  echo -e "\a* File $PID_FILE does not exist or is empty!" >&2
  exit 1
fi
#
TC_PID=`cat $PID_FILE`
kill -15 $TC_PID
echo '******* Link terminated *** Charges: *******'
tail -2 $STAT_FILE
