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

elif [ $lang == en ]; then

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

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

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

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

elif [ $lang == it ]; then

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

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

fi

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

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