#!/bin/bash trap "" 2 20 VPN=$(! [ -z "$(ifconfig | grep 'ppp')" ] && ifconfig ppp0 | grep "inet" | awk {'print $2'}) if [ -z "$VPN" ] ; then #ps aux | grep pppd | grep simplesip | awk {'print $2'} | xargs kill -9 #sleep 1 pppd call simplesip fi