#!/bin/sh
################################################################################
#                                                                              #
# Polish Kathi Team 2009                                                       #
#                                                                              #
# contact: http://pkt.sat-elita.info/                                          #
#                                                                              #
################################################################################

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

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

if [ $lang == pl ]; then

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

elif [ $lang == en ]; then

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

elif [ $lang == de ]; then

  info1="Fehler - keine MBox_CS !!!"
  info2="MBox_CS startet..."
  info3="MBox_CS gestartet "

elif [ $lang == it ]; then  
  
  info1="Errore - MBox_CS non trovato !!!"
  info2="MBox_CS in avvio..."
  info3="MBox_CS avviato"

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

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

if [ ! -s /var/emu/mbox_CS ] ; then
    echo $info1
    echo ""
else
    $SYMLINK/emustop.sh
  if [ $newcs == on ]; then 
    $SYMLINK/newcs_stop.sh
    sleep 5
  fi
    echo $info2
    /var/emu/mbox_CS /var/keys/mbox_CS.cfg > /dev/null &
    echo /var/etc/mbox_CS > /var/etc/active_cam
    echo emuname =mbox_CS > /var/etc/mbox_CS
    echo emu=mbox_CS > /var/config/emu.conf
    echo $info3
fi

exit 0
