#!/bin/csh -f

# kill pppd daemon - make sure you use the right signal, others may
# not hangup the other side, and hence you have a dangling modem connection

set id=(`ps -ax | grep 'pppd' | grep -v grep | awk '{print $1}'`)
echo Found PID=$id
if ("X$id" != "X") then
  kill -INT $id
endif
echo "PPPKILL  `date`" >> /var/log/ppp.log

# make sure the modem is turned off
# sleep 10
# modem-stats -c ATZ /dev/modem

