#!/bin/sh -e
## This script is run when the ppp link goes down.
## It simply puts wwwoffle offline.

if [ -n "`/bin/ps ax | grep -v grep | grep /usr/sbin/diald`" ]; then
	/usr/bin/wwwoffle -c /etc/wwwoffle/wwwoffle.conf -autodial;
else 
	/usr/bin/wwwoffle -c /etc/wwwoffle/wwwoffle.conf -offline;
fi
