View Single Post
Old 17.01.2011, 00:22
Posts: n/a
Default Linux users (Ubuntu at least)

hi there!! I wroted this script and posted it in ubuntu help forum. It should work on every linux/unix system i think with a ppp based internet connection (think it is said like this) Works via telnet generally on those systems.
This is muy guide for ubuntu/debian users.

First of all, script is written in bash expect (think is like that)we have to install the expect lib via synaptic or terminal

sudo apt-get install expect
We create the .sh file and put it in home/"user"/JDownloader/ i do it like that:

sudo gedit /home/"user"/JDownloader/
and paste the text above as it is but changing your own data

#! /usr/bin/expect 

spawn telnet (or your routers' address) 
expect "Login:" 
send "admin or your login\r" 
sleep 2 
expect "password:" 
send "yourpassword\r" 
sleep 2 
expect ">" 
send "ppp config ppp0 down\r" 
sleep 5 
expect ">" 
send "ppp config ppp0 up\r" 
sleep 5 
expect ">" 
send "exit\r"
we give script's permissions

sudo chmod +x /home/"youruser"/JDownloader/
then in settings>>reconnection in external tab in command select your script's route

After all you can tweak reconnection times, in advanced. Mines are


wich gives me a reconection time of 30 seconds, think it can be improved.

Hope it helps.
Reply With Quote