#!/bin/sh

#. /var/config/link
  cd /tmp/
wget http://ipbox900.com.ua/setup/satellites/satellites.xml
	# echo "Update error"
	# echo ""
if [ -e /tmp/satellites.xml ] ; then      
	echo "Unpacks updates"
	echo "Load File" > /dev/dbox/fp0
         cd /tmp/      

	rm -f /etc/tuxbox/satellites.xml
	sleep 2
        cp -f /tmp/satellites.xml /etc/tuxbox/satellites.xml
       sleep 1
       rm -r /tmp/satellites.xml
	sleep 1
	echo ""
       echo "Update completed successfully"
 sync
    sleep 1
    echo ""
    echo "Receiver will be restarted"
    sleep 2
    sync
    sleep 1
    killall -9 enigma2
    reboot
else 
echo "No Satellites.xml  on the server, or a problem!"    
fi

sync

exit 0