#!/bin/sh
################################################################################
#                                                                              #
# Polish Kathi Team 2009                                                       #
#                                                                              #
# contact: http://pkt.cal.pl /                                                 #
#                                                                              #
################################################################################

. /var/config/link
. /var/config/emu.conf
. /var/config/language.conf

#-------------------------------------------------------------------------------
#language section
#-------------------------------------------------------------------------------

if [ $lang == pl ]; then
  info1="Zatrzymanie dzialajacego UFS910Camd"
  info2="Kasowanie UFS910Camd"
  info3="UFS910Camd usuniety!"
  info4="Brak zainstalowanego UFS910Camd"

elif [ $lang == en ]; then
  info1="UFS910Camd is stopping"
  info2="Deleting UFS910Camd"
  info3="UFS910Camd deleted!"
  info4="UFS910Camd is not installed"     

elif [ $lang == ar ]; then

  info1="UFS910Camd إيقاف"
  info2="UFS910Camd حذف"
  info3="UFS910Camd تم حذف"
  info4="UFS910Camd لم يتم تنصيب"

elif [ $lang == fr ]; then

  info1="UFS910Camd s'arrete"
  info2="Suppression UFS910Camd"
  info3="UFS910Camd supprime!"
  info4="UFS910Camd n'est pas installe"
  
elif [ $lang == de ]; then
  info1="Stoppe UFS910Camd"
  info2="Losche UFS910Camd"
  info3="UFS910Camd geloscht!"
  info4="Keine UFS910Camd"

elif [ $lang == it ]; then
  info1="UFS910Camd e' in arresto"
  info2="Eliminazione UFS910Camd ..."
  info3="UFS910Camd eliminato!"
  info4="UFS910Camd non installato"

elif [ $lang == es ]; then
  info1="UFS910Camd se esta parando"
  info2="Borrando UFS910Camd"
  info3="UFS910Camd borrada!"
  info4="UFS910Camd no esta instalada"  

fi

#-------------------------------------------------------------------------------
#script section
#-------------------------------------------------------------------------------

 if [ $emu == ufs910camd ]; then
    echo $info1
    killall -15 ufs910camd 2>/dev/null
    sleep 3
    echo /var/etc/no_emu > /var/etc/active_cam
    echo emuname =no_emu > /var/etc/no_emu
    echo emu=no_emu >/var/config/emu.conf
 fi

 if [ -s /var/emu/ufs910camd ] ; then
    echo $info2
    rm /var/emu/ufs910camd 2>/dev/null
    sleep 3
    echo $info3
 else
    echo $info4
 fi

echo ""

exit 0