Route Check Script

#!/bin/bash
# Bash Shell is written for checking the route table for pppd
# I don'd know why after reconnect to HGC the route table will be changed.
#
#
# 050801 Jeffrey Script Created

if [ -z "`route | grep ppp | grep default`" ]; then
/sbin/route add -net 0.0.0.0 netmask 0.0.0.0 ppp0
#mail root -s "Route Table Added..." < /root/routecheck.sh
echo "$(date) $0 Route Table Added" >> /var/log/routecheck.log
fi

用和記上網,有時轉左ip 時會冇左個route table,所以要寫返過script 成日check 住有冇route 到出街,不然,會上不到網而其他人見不到自己個server

Comments

Popular Posts