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

. /var/config/symlink
. /var/config/language.conf

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

if [ $lang == pl ]; then

  info1="Blad - brak emu MPCS !!!"
  info2="MPCS startuje..."
  info3="MPCS uruchomiony"

elif [ $lang == en ]; then

  info1="Error - MPCS is missing !!!"
  info2="MPCS is starting..."
  info3="MPCS is running"

elif [ $lang == ar ]; then

  info1="مفقود MPCS -- خطأ"
  info2="MPCS يتم تشغيل"
  info3="يعمل MPCS"

elif [ $lang == fr ]; then

  iinfo1="Error - MPCS introuvable !!!"
  info2="execute MPCS..."
  info3="MPCS est active"

elif [ $lang == de ]; then

  info1="Fehler - kein MPCS !!!"
  info2="MPCS startet..."
  info3="MPCS gestartet"

elif [ $lang == it ]; then

  info1="Errore - MPCS non trovato !!!"
  info2="MPCS in avvio..."
  info3="MPCS avviato"

elif [ $lang == es ]; then
  info1="Error - MPCS no existe !!!"
  info2="MPCS se esta arrancando..."
  info3="MPCS esta activa"

fi

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

if [ ! -s /var/emu/mpcs ] ; then
    echo $info1 
    echo ""
else
    $SYMLINK/emustop.sh
        
    echo $info2
    /var/emu/mpcs -c /var/keys>/dev/null &
    echo /var/etc/mpcs >/var/etc/active_cam
    echo emuname =mpcs > /var/etc/mpcs
    echo emu=mpcs >/var/config/emu.conf
    echo $info3
fi

exit 0
