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

elif [ $lang == en ]; then

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

elif [ $lang == ar ]; then

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

elif [ $lang == fr ]; then

  info1="Erreur - UFS910Camd est manquant !!!"
  info2="UFS910Camd commence..."
  info3="UFS910Camd exécute"

elif [ $lang == de ]; then

  info1="Fehler-kein UFS910Camd !!!"
  info2="UFS910Camd startet..."
  info3="UFS910Camd gestartet"
  
elif [ $lang == it ]; then

  info1="Errore - UFS910Camd non trovata !!!"
  info2="UFS910Camd in avvio..."
  info3="UFS910Camd avviata"

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

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

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

exit 0
