#!/bin/bash

PIDFILE=/var/run/ppp-ppp_client.pid
LOGGER="/bin/logger -t $0"

echo "1" > /tmp/stop-adsl

if [ -r "$PIDFILE" ] ; then
	PID=`cat $PIDFILE`

	/bin/kill $PID > /dev/null 2>&1

	$LOGGER "PPP Process killed"
else
	PID=`/bin/pidof ppp-client`

	if [ -n "$PID" ] ; then
		/bin/kill $PID > /dev/null 2>&1

		$LOGGER "PPP Process killed"
	fi
fi

exit 0
