Diferencias

Muestra las diferencias entre la revision seleccionada y la versión actual de esta página.

ejemplos:act_everydns [2009/05/30 22:45]
fpereira
ejemplos:act_everydns [2009/05/30 23:48] (actual)
fpereira
Línea 2: Línea 2:
#!/bin/bash #!/bin/bash
-#EveryDNS 
-USERNAME=usuario_everydns 
-PASSWORD=clave 
-DOMAIN=luisplatinetti.com 
-URL=http://dyn.everydns.net/index.php 
-INTERFACE=ppp0 
-# Actualizando IP  +DOMAIN="tudominio.com" 
-LOCAL_IP=`ifconfig $INTERFACE | egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' | egrep -v '255|(127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})'`+USER="usuario" 
 +PASS="clave" 
 +VER="0.1"
-curl -u $USERNAME:$PASSWORD "$URL?ver=0.1&ip=$LOCAL_IP&domain=$DOMAIN"+IP=$(curl -s http://myip.dk/ | egrep -m1 -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') 
 + 
 + 
 +if [ -r "/tmp/oldip.txt" ]; then 
 +  OLDIP=`cat /tmp/oldip.txt` 
 +  if [ "$OLDIP" = "$IP" ]; then exit 0; fi 
 +fi 
 + 
 +echo $IP > /tmp/oldip.txt 
 + 
 +wget -q --http-user="${USER}" --http-password="${PASS}"  "http://dyn.everydns.net/index.php?ver=${VER}&ip=${IP}&domain=${DOMAIN}" -O -
</code> </code>
 
ejemplos/act_everydns.txt · Última modificación: 2009/05/30 23:48 por fpereira
 
Excepto donde se indique lo contrario, el contenido de esta wiki se autoriza bajo la siguiente licencia:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki