JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 18.07.2010, 00:42
Pressfred
Guest
 
Posts: n/a
Default Reconnect for IPCop?

I admit, I am lazy, as I could learn enough to write the script manually instead of recording it. I use an IPCop Linux router, whose web interface does not run on a standard port, it's https on port 443. How can I record a Reconnect despite that? Or is anyone else here using IPCop and can post the script here?

oops, wrong section, sorry. Mods, please feel free to move. Thanks!

Last edited by Pressfred; 18.07.2010 at 00:49.
Reply With Quote
  #2  
Old 22.11.2010, 14:27
Pressfred
Guest
 
Posts: n/a
Default

OK, now I have figured it out how to let IPCop do a reconnect:

Copy the following script as /root/reconnect.sh to your IPCop machine:
Code:
#!/bin/bash

if [ ! -z "`ps -eaf | grep updatered | grep -v grep`" ]; then
    # IPCop macht gerade einen reconnect
    /usr/bin/logger -t ipcop "reconnect.sh: rc.updatered is running.
Exit."
    exit
fi

/usr/bin/logger -t ipcop "reconnect.sh: Starting reconnect"

/etc/rc.d/rc.red stop

while [ -e "/var/ipcop/red/active" -o -e "/var/run/ppp-ipcop.pid" ]; do
    /bin/sleep 1
done

/etc/rc.d/rc.red start

/usr/bin/logger -t ipcop "reconnect.sh: Reconnect finished."
Make the script executable with:
Code:
chmod +x reconnect.sh
Then, if your run Windows, use plink.exe from the PuTTY suite to execute the script on IPCop:
Code:
plink.exe -ssh -P 222 -pw $ROOTPASSWORT root@ipcophostname ~/reconnect.sh
If you don't want to have your root password written in clear text somewhere else than your brain, you'll have to configure sshd on the IPCop to RSA authentication. The key gets stored in Pageant, and you'll have to type in it's passphrase once at each startup (you could leave the passphrase empty).

In JD, go to the "Batch" tab under "Reconnection". Put "cmd /C" in the interpreter field, and the above plink command line is the batch script. In the advanced options, set the "first IP check wait time" to 10-15 sec., and reduce the "max. retries" to 2 or 3.

It is not 100% reliable (yet), sometimes the reconnect fails. I will post again if I can find some settings that bring improvement.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 18:18.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.