miércoles, 21 de diciembre de 2011

reboot automatico de router pirelli




pirelli_reboot.sh

#!/usr/bin/expect
set timeout 20
set name 192.168.1.25
set user admin
set password MIPASS
spawn telnet $name
expect Login:
send "$user\r"
expect "Password: "
send "$password\r"
expect ">"
send "sh\r"
sleep 1
send "reboot\r"
expect "... done"

No hay comentarios: