#!/tvbin/tivosh set filename "showlisteastern" putlog "removing old files" catch {file delete /var/hack/runupdate.jpg} catch {file delete /var/hack/showlist.jpg} catch {file delete /var/hack/runupdate.tcl} catch {file delete /var/hack/showlist} set cmd "http_get -t 180 -D /var/hack -T 0 -C 0 -U http://209.1.225.217:80/paglierani/showlist.jpg" putlog "Getting showlist - $cmd" if [catch { eval exec $cmd } msg ] { puts "ERROR running http_get: $msg" } set cmd "http_get -t 180 -D /var/hack -T 0 -C 0 -U http://209.1.225.217:80/paglierani/runupdate.jpg" putlog "Checking for new Update Script - $cmd" if [catch { eval exec $cmd } msg ] { puts "ERROR running http_get: $msg" } putlog "renaming files" if [ file exists /var/hack/runupdate.jpg ] { catch { eval exec mv /var/hack/runupdate.jpg /var/hack/runupdate.tcl } } if [ file exists /var/hack/showlist.jpg ] { catch { eval exec mv /var/hack/showlist.jpg /var/hack/showlist } } putlog "running update" exec tivosh /var/hack/runupdate.tcl >@ stdout return 0