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

elif [ $lang == en ]; then

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

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

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

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

elif [ $lang == it ]; then

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

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

fi

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

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

exit 0