#!/tvbin/tivosh 

# daily_call.tcl
#
# Starts a Daily Call, if one is not already in progress.
# Intended to be called from cron.
# cron can be downloaded from here: ftp://ftp.alt.org/pub/tivo/dtype/
# e.g. the following line in crontab will force a call at 8am GMT every Sunday:
# 0 8 * * 6 /var/hack/daily_call.tcl > /var/log/daily_call &
# Save this file to /var/hack and run 'chmod +x /var/hack/daily_call.tcl'
#
# http://www.ljay.org.uk/tivoweb
# LJ @ http://www.tivocommunity.com/
#
# 09Aug04 17:00  v1.0

# Change the port number if your TiVoWeb(Plus) isn't running on port 80
set port 80


exec ifconfig lo up
set chan [socket localhost $port]
puts -nonewline $chan "GET /Dcall HTTP/1.0\r\n\r\n"
flush $chan
set reply [read $chan]
close $chan
