#!/bin/sh

. /var/config/symlink

if [ ! -s /var/emu/incubusCamd ] ; then
    echo "Error - missing IncubusCamd !!!"
    echo ""
else
    #echo "IncubusCamd stop..."
    $SYMLINK/emustop.sh
    sleep 2
    
    echo "IncubusCamd Started..."
    /var/emu/incubusCamd >/dev/null &

    echo emu=incubusCamd >/var/config/emu.conf
    echo "IncubusCamd Started"
fi

sleep 2
   if [ -s /var/keys/newcs.xml ] ; then
      echo $info1
      /var/bin/newcs -C /var/keys/newcs.xml >/tmp/log_newcs &
      sleep 2
      echo "Newcs Started.."
   else
      echo "Error - missing Newcs !!!"
   fi

exit 0