#!/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 KBox !!!"
  info2="KBox startuje..."
  info3="KBox uruchomiony"

elif [ $lang == en ]; then

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

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

  info1="Error - KBox introuvable !!!"
  info2="execute KBox..."
  info3="KBox est active"

elif [ $lang == de ]; then

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

elif [ $lang == it ]; then

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

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

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

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

exit 0
