|
2009-12-13
, 11:31
|
Posts: 3 |
Thanked: 12 times |
Joined on Oct 2009
@ Varberg
|
#12
|
The Following 12 Users Say Thank You to Crocodile For This Useful Post: | ||
anjanaya, DaSilva, grog, iKneaDough, jsomby, kortsi, labra, n1110000100, Netweaver, qole, Soulfarmer, timwatt |
|
2009-12-29
, 10:15
|
Posts: 125 |
Thanked: 67 times |
Joined on Sep 2009
@ Finland
|
#13
|
|
2009-12-29
, 11:47
|
Posts: 31 |
Thanked: 32 times |
Joined on Jan 2008
@ Helsinki
|
#14
|
I did just what Crocodile suggested, manual run worked nice, but booting up the device didn't work as I supposed it should have, dyndns didn't update. Also, is it possible to get the script update each time connection is re-established and the ip changes, not just when network comes up?
The Following User Says Thank You to kortsi For This Useful Post: | ||
|
2009-12-30
, 20:21
|
Posts: 125 |
Thanked: 67 times |
Joined on Sep 2009
@ Finland
|
#15
|
|
2009-12-31
, 13:37
|
Posts: 3,841 |
Thanked: 1,079 times |
Joined on Nov 2006
|
#16
|
|
2010-01-03
, 00:56
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#17
|
http://ipcheck.sourceforge.net/
Create file /etc/network/if-up.d/dyndns:
#!/bin/bash
cd /path/where/you/keep/pythonscript
python ipcheck.py -i gprs0 username password domain.dyndns.org
chmod 755 /etc/network/if-up.d/dyndns
First time, run manually:
python ipcheck.py --makedat -i gprs0 username password domain.dyndns.org
So it created it's data file.
And now you have autoupdating dyndns on the phone.. happy SSHing
#!/bin/sh interface=`ifconfig | grep -iE "(wlan0|gprs0)" | awk '{print $1}'` echo "$(date) - $interface $ICD_CONNECTION_TYPE" >> /var/log/dyndns.log sleep 10 echo "$(date) - $interface $ICD_CONNECTION_TYPE" >> /var/log/dyndns.log cd /home/user/apps/ case "$interface" in gprs0) while [ -z "$(ifconfig gprs0 | grep inet | awk '{print substr($2,6,length($2))}')" ] do echo "$(date) - No IP yet for gprs0" >> /var/log/dyndns.log sleep 2 done python ipcheck.py -v -i gprs0 USER PASSWORD DynDNSHOST >> /var/log/dyndns.log ;; wlan0) while [ -z "$(ifconfig wlan0 | grep inet | awk '{print substr($2,6,length($2))}')" ] do echo "$(date) - No IP yet for wlan0" >> /var/log/dyndns.log sleep 2 done python ipcheck.py -v -i wlan0 -r checkip.dyndns.org:8245 USER PASSWORD DynDNSHOST >> /var/log/dyndns.log ;; *) echo "$(date) - No interface found!" >> /var/log/dyndns.log ;; esac echo " " >> /var/log/dyndns.log exit 0
|
2010-01-19
, 10:43
|
Posts: 27 |
Thanked: 21 times |
Joined on Jan 2010
|
#18
|
|
2010-01-19
, 11:48
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#19
|
|
2010-01-19
, 13:24
|
Posts: 27 |
Thanked: 21 times |
Joined on Jan 2010
|
#20
|
Which script have you used for this? Crocodiles version only with grps0 support or my version for grps0 and wlan0 support?
The Following User Says Thank You to lbthomsen For This Useful Post: | ||
To find yourself, think for yourself
-Socrates 469 BC