#!/bin/sh
echo "Attendere...occorrono circa 2 minuti..."
echo " "
#echo "Verifica orario del decoder...."
#/usr/bin/ntpdate ntp1.ien.it 2>/dev/null 1>&2
#date
echo "Downloading EPG..."
#wget -O /tmp/sid http://127.0.0.1/web/subservices 2>/dev/null 1>&2
#SID=`cat /tmp/sid | grep e2servicereference | sed "s/^.*//" | sed "s/<\/e2servicereference>.*$//"`
#rm -f /tmp/sid
#wget -O /dev/null http://127.0.0.1/web/zap?sRef=1:0:1:E33:16A8:FBFF:820000:0:0:0: 2>/dev/null 1>&2
#sleep 4
/var/myepg/myepg_downloader -d /var/myepg/dati 2>/dev/null 1>&2
sync
#wget -O /dev/null http://127.0.0.1/web/zap?sRef=$SID 2>/dev/null 1>&2
echo ""
echo "...Ancora 30 secondi..."
/var/myepg/myepg_dbconverter -e /var/myepg/dati/ext.epg.dat -d /var/myepg/dati 2>/dev/null 1>&2
sync
echo ""
echo "...RIAVVIARE IL DECODER PER ATTIVARE L'EPG SETTIMANALE!!!"
exit 0