Monday, January 24, 2005

:Linux: ppp0 auto reconnect

guys, I have ADSL through ppp0, How to set it to auto reconnect when
Thanks in advance

This script should do what you want.

============= =============
# Script to check if modem is disconnected & try reconnecting
# Graham Smith - 01/02/2004
# set -x
result=$(/usr/bin/cinternet -i dsl0 -s | /usr/bin/grep disconnect)
#Checks the status of device dsl0 'disconnect'
if [ -n "$result" ]
/usr/bin/cinternet -i dsl0 -A #Start the interface.
sleep 10
else #The interface is up - Just exit
exit 0

Just add the following line to your crontab, replacing with the path
you installed the script in. It checks to see if the modem has been disc
every 3 minutes.

4-59/3 * * * * / 2>&1 /dev/null


Graham Smith

Thank you Graham!
& Thank you basem Narmoug

No comments:

Post a Comment