#!/bin/sh if [ -f /var/run/dyngw_method_ping ] then ping -c 1 google.d if [ $? = 0 ] then echo "Line is up" echo "Line is up" >/var/run/dyngw_ping_result.up else echo "Line is down" rm /var/run/dyngw_ping_result.up fi