#!/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 KBox"
  info2="Kasowanie KBox"
  info3="KBox usuniety!"
  info4="Brak zainstalowanego KBox"

elif [ $lang == en ]; then

  info1="KBox is stopping"
  info2="Deleting KBox"
  info3="KBox deleted!"
  info4="KBox is not installed"     

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

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

  info1="Stoppe KBox"
  info2="Losche KBox"
  info3="KBox geloscht!"
  info4="Keine KBox"

elif [ $lang == it ]; then

  info1="KBox e' in arresto"
  info2="Eliminazione KBox ..."
  info3="KBox eliminato!"
  info4="KBox non installato"

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

fi

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

 if [ $emu == kbox ]; then
    echo $info1
    killall -15 kbox 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/kbox ] ; then
    echo $info2
    rm /var/emu/kbox 2>/dev/null
    sleep 3
    echo $info3
 else
    echo $info4
 fi

echo ""

exit 0