Skip to main content

:Linux: ppp0 auto reconnect

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


This script should do what you want.

============= reconnect_modem.sh =============
#!/bin/sh
#
# 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" ]
then
/usr/bin/cinternet -i dsl0 -A #Start the interface.
sleep 10
else #The interface is up - Just exit
exit 0
fi
==================================

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 * * * * /reconnect_modem.sh 2>&1 /dev/null

--
Regards,

Graham Smith


Thank you Graham!
& Thank you basem Narmoug

Comments

Popular posts from this blog

Zend PHP 5 Certification Voucher *sheesh* DISCOUNT

In 2005 we had great discount from Zend for the PHP4 exam voucher, guide and practice book, This year, couple of months ago we at JoPHP (Jordan PHP Users Group) for PHP5 Exam festival, we had plan to do one week exam preparation session and then twenty five of us was motivated to take the exam. Many things slowed down the plan and killed the motive and I guess you are safe to put it on me and blame me for that; Hope we will be able to prepare for another event later in 2007. But anyway we always have B plan and here is the deal Purchase PHP 5 Certification Guide which is available in PDF format Practice for the exam Purchase the Certification voucher and use this zcej100 discount code to get $25 off your order. When you feel comfortable, Schedule your test and take the exam Big thanks for Zend for their generous offer and hope we can make better plan for such event next year. Wish you the best. [tags] php users, zend, voucher, users group, many things, motive, jordan, certif

?????? ?????

?????, ?????, ????? ??? ???? ?????! ?? ????? ??????? ???, ??? ?? ???? ?? ?????? ??? ???? ?? ???? ??? ???? ?? ??? ???? ???? , ???? ???? ????? ???????, ????????, ???? ???????, ???? ? ???? ? ???? ????? ???? ????? ??????, ?????? ???? ?? ????? ?????? ???? ????? ??? ??????? ?? ????? ? ??? ?? ??????? ???????? ?? ???? ?? ????? ???? ????? ??? ?????? ? ???? ?????? ????? ? ???? ????? ?????? ???? ?????? ???? ???? ????? ? ???????? ???? ???????, ??? ?????? ????? ?? ??? ????? ?????? ??? ??????? ??? ??? ??????? ????? ???? ? ???? ????? ??? ???? ??? ???? ???? ??????, ?? ????? ??? ?????? ???????? ??? ?????? ?? ??? ???? ???? ?? ??, ???? ???? ??? ?? ????? ?????? ??????

اهم التطورات العلمية في العام ٢٠١٩