#!/bin/sh
echo "**********************************"
echo "*******    Update run...	******** "
echo "**********************************"

cd /home/CAPELEC/DATA/update/dirtmp/
killall 1830
cp 1830 /usr/bin/

if [ $? = 0 ]; then
	echo "update OK"	
	echo "export VERSION=V1.06" > /etc/info
	echo "export DATE=28/03/2014" >> /etc/info
	echo "export INFORMATION=" >> /etc/info
else
	echo "update NOK!!!!"	
	VERSION=`cat /etc/info | grep VERSION`
	DATE=`cat /etc/info | grep DATE`
	
	echo "$VERSION" > /etc/info
	echo "$DATE" >> /etc/info
	echo "export INFORMATION=Update Error" >> /etc/info
fi			

reboot


