my last post wasnt worded right anyway so here it is better with more information.
To find out if ppp0 is up you need to grep the output of ifconfig for it, using 'ifconfig | grep ppp0' if anything is found the exit value is 0 if nothing is found it is 1. to check the exit value use the variable $? which is a bash bult-in variable. So the script would be something like this:
ifconfig | grep ppp0 > /dev/null
if [ $? = "1" ]