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

elif [ $lang == en ]; then

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

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

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

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

elif [ $lang == it ]; then

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

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

fi

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

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

exit 0