Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Basado en el script de @dvastazion http://pastebin.com/nJFXHuGk
- #Sube la IP pública del host a un ftp para su administración remota (Al estilo No-IP)
- #Descubrimos el nombre del host
- hostname=$(hostname)
- #Descubrimos la IP
- IP=$(curl icanhazip.com)
- which curl
- if [ $? != 0 ];then
- echo "This script need curl"
- exit 1
- fi
- #Creamos el txt con el nombre del host y la IP pública
- echo $IP > $hostname.txt
- #Subimos el fichero
- curl -T $hostname.txt -u USER:PASSWORD ftp://ftp.domain.com/folder/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement