/opt/reconnect >> /opt/pptp_pinger.log 2>&1

#!/bin/sh
HOST=192.168.1.1
DATE=`date`
PINGRES=`ping -c 2 $HOST`
PLOSS=`echo $PINGRES | grep -oE '[0-9]{1,3}% packet loss' |  cut -f1 -d%`
echo "$DATE : Loss Result : $PLOSS"
 
if [ "100" -eq "$PLOSS" ] ;
then
    echo "$DATE : Starting : $HOST"
    service pptpclient restart
    echo "$DATE : Now running : $HOST"
else
    echo "$DATE : Already running : $HOST"
fi

.profile

/usr/sbin/mymotd
export TERMINFO=/opt/share/terminfo
alias mc="mc -c"